Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Microsoft Word Document Merging
I have existing documentation, an Instructor Guide and a Participant Guide.
I need to merge them in by some automated means so the pages align numerically. Page one of the Instructor guide as the first page, page one of the participant guide as the second page so when I print the document out and put it in a binder, the pages are facing each other. Can this be done? If so, how? Thanks!!!!! -- Chuck |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Microsoft Word Document Merging
Here is the code for a macro that I created for someone who wanted to
compile a document with alternating pages coming from different source documents. Dim sourcea As Document, sourceb As Document, target As Document Dim Pages As Integer, Counter As Integer Dim targetrange As Range Set sourcea = Documents.Open(FileName:="...") sourcea.Repaginate Pages = ActiveDocument.BuiltInDocumentProperties(wdPropert yPages) Set sourceb = Documents.Open(FileName:="...") Set target = Documents.Add target.PageSetup.LeftMargin = sourcea.PageSetup.LeftMargin target.PageSetup.RightMargin = sourcea.PageSetup.RightMargin target.PageSetup.TopMargin = sourcea.PageSetup.TopMargin target.PageSetup.BottomMargin = sourcea.PageSetup.BottomMargin target.AcceptAllRevisions Counter = 0 While Counter Pages sourcea.Activate ActiveDocument.Bookmarks("\page").Range.Copy Set targetrange = target.Range targetrange.Start = targetrange.End targetrange.Paste ActiveDocument.Bookmarks("\page").Range.Cut sourceb.Activate ActiveDocument.Bookmarks("\page").Range.Copy Set targetrange = target.Range targetrange.Start = targetrange.End targetrange.Paste ActiveDocument.Bookmarks("\page").Range.Cut Counter = Counter + 1 Wend sourcea.Close wdDoNotSaveChanges sourceb.Close wdDoNotSaveChanges -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Chuck" (DONOTSPAM) wrote in message ... I have existing documentation, an Instructor Guide and a Participant Guide. I need to merge them in by some automated means so the pages align numerically. Page one of the Instructor guide as the first page, page one of the participant guide as the second page so when I print the document out and put it in a binder, the pages are facing each other. Can this be done? If so, how? Thanks!!!!! -- Chuck |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 97 in Windows XP to maintain formatting | Microsoft Word Help | |||
take yet another lesson from wordperfect "reveal codes" | Microsoft Word Help | |||
Word & WordPerfect | Microsoft Word Help | |||
Is there something like wordperfect "variables" in microsoft word? | Microsoft Word Help | |||
WP merge file to Word | Tables |