vba concatenation of Word (.docx) 'source' documents into one masterWd.docx. How to include headers of original source documents?

I concatenate separate word docx (with header content) into wdDoc, then wdDoc is saved in wordFormatPdf.
Neither wdDoc nor the PDF display the header texts.

Extract of code:---------------------------------------------

Set wdDoc = wdApp.Documents.Add
Do Until sh.Cells(r, 1).value = ""    'rows with qualifying file names have sh.Cells(r, 1) <>"" 
        If Len(wdDoc.Range) > 0 Then
            wdDoc.Bookmarks("\EndOfDoc").Range.InsertBreak wdPageBreak
        End If
                                                ' sh.Cells(r, 2).value provides source wd file names:
        wdDoc.Bookmarks("\EndOfDoc").Range.InsertFile FileName:=Source_Path & sh.Cells(r, 2).value
        r = r + 1
                          'Source_Path = filePath
wdDoc.SaveAs Source_Path & "concat_wd_doc", wdFormatDocument
wdDoc.SaveAs Source_Path & help_PDF_FileName, wdFormatPDF
wdDoc.Close wdDoNotSaveChanges

End of code:-------------------------------------------------

The first page of wdDoc is intentionally blank, ie the first concatenated file appears at r=1

Headers for source documents contain two rows of text, including Word 'quick parts': fileName; Page; numPages
Neither the concat_wd_doc, nor the ultimate PDF file display the headers provided in the original source docx.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

InsertFile takes the header from the target document and you have just created one with a blank header.
Remove this:
 If Len(wdDoc.Range) > 0 Then
            wdDoc.Bookmarks("\EndOfDoc").Range.InsertBreak wdPageBreak
  End If

Open in new window

and put this just before the saves
    wdDoc.Range(0, 0).InsertBreak wdPageBreak

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kelvin4Author Commented:
Graham, thanks for immediate help.

You have shed light and method, however, ...
you have also smoked out some further problems with my code, so I may be back to you, after I've cut the code down and identified the troublesome bits.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.