Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Copy formatted text but not headers/footers
I have the following VBA code to copy some text from between Word documents (I'm familiar with VBA but not the Word object library): Const PLACEHOLDER_TEXT As String = "||ADD TEXT HERE||" ' Copy from source to clipboard docSource.Activate docSource.Sections(x).Range.Copy ' Paste from clipboard to target docTarget.Activate Selection.Find.Execute PLACEHOLDER_TEXT, , , , , , True, WdFindWrap.wdFindContinue Selection.Paste What I want is for the section's formatted text to be copied/pasted into the existing section in the target document so that the headers/footers in the target document are preserved. However, what seems to be happening is that the copied text is pasted as a new Section object including the now empty headers/footers. In other words, I want the formatting (fonts, tables, borders, etc) from the source document but not the headers/footers. Is this possible? Thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I copy entire pages including Headers and Footers | Microsoft Word Help | |||
Copy headers/footers between documents and pages | Page Layout | |||
Copy formatted text but not headers/footers | Microsoft Word Help | |||
Copy whole document with Headers/footers | Page Layout | |||
Copy everything except headers and footers | Microsoft Word Help |