That took care of the error but the Header from the previous pages is still getting placed on the new page created by the section break where the copied text gets inserted.
It errors out on line
[highlight #FCE94F].FormattedText =[/highlight] DocSrc.Range.FormattedText
Compile Error states method or data member not found and highlights .FormattedText =
I tried changing it to RngSel.FormattedText = DocSrc.Range.FormattedText
but then I get an error "Cannot copy...
Maybe I'm not explaining this clearly. I have a Word template(dotm) that users insert a Word document (docx) into that has headers. Once this first document is inserted the users place their cursor where they want the next document inserted then pick from several other Word documents to insert...
Thanks Paul. This seems to work except it is adding the header of the base document to the document that gets inserted. What do I need to do to keep this from happening?
The documents that get inserted have different headers so I do want them. I don't want the header from the previous inserted document to get added to the new inserted document that may have its own header or may not have one at all. They are all different.
I have the following VBA code in a Word Template to insert a document at the cursor position when someone selects a button on the Word Ribbon (In this case it would be a document named 04-10A.docx). The code does this with no issues. The inserted document has a header and footer. The error...
I have the following VBA code in a Word Template to insert a document at the cursor position when someone selects a button on the Word Ribbon (In this case it would be a document named 04-10A.docx). The code does this with no issues. The inserted document has a header and footer. The error...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.