Thanks, I followed the instructions AND found it works.
However:
- It works when on a target document that is empty.
- For the document that fully filled with information, it's showing error on paste.
My guess is that it needs time for completing the edit at PASTE action, but I don't know how to deal with it.
Please advise!
Here is the part of code where it is stuck (Bolded) and the error message is "(run time error 4505, This method or property is not available because the current selection is locked for editing"
' First Page Footers copy and paste
Set footer1 = docTemplate.Sections(1).Footers(wdHeaderFooterFirs tPage)
Set footer2 = doc.Sections(1).Footers(wdHeaderFooterFirstPage)
doc.PageSetup.DifferentFirstPageHeaderFooter = True
footer1.Range.Copy
footer2.Range.Paste
Set footer1 = Nothing
Set footer2 = Nothing
|