View Single Post
 
Old 12-04-2020, 02:42 PM
eduzs eduzs is offline Windows 10 Office 2019
Expert
 
Join Date: May 2017
Posts: 266
eduzs is on a distinguished road
Default Copying is causing header to be lost

Currently I'm using this code to copy the formatted text from section(x) of one to another document:
Code:
nDoc.Sections(x).Range.Copy
nDoc2.Range.PasteAndFormat wdFormatOriginalFormatting
I have no idea why only when nDoc have more than 2 sections, pasting is causing header of nDoc2 to be deleted, so the code not works as intended.
The solution I thought, if there is no better one, was to copy and paste only the main text region, excluding the header. How to do this?
I appreciate any help.
Thanks
__________________
Backup your original file before doing any modification.
Reply With Quote