Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Page Layout / December 2006

Tip: Looking for answers? Try searching our database.

merge 2 docs-diff odd & even pages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gambledcat - 26 Dec 2006 02:40 GMT
How can I take two Word docs and merge them together so doc 1 is on the
left-hand (even numbered) pages and doc 2 is on the right-hand (odd numbered)
pages? AND, if I can do this, is there a way to a) have doc 2 maintain its
unique page numbers? (hey, its christmas...miracle time, right?)

Here's what I'm doing:
I'm working on a long (200 page) Word document. It's a course curriculum.
I've got the student guide and the instructor guide as two separate
documents. For the final instructor guide, I would like to have the teacher
page on the left-side pages and the student pages on the right-side pages.
That way the teacher can see what the students see as they see it in their
book. This means I need to keep the page numbers the same on the student
pages as they are in the student guide (so, we might be in page 40 of the
instructor guide, but only page 23 on the student guide).

My first thought was to make a .tiff image of each student page and insert
the images every other page. (lots of work, but it works) - the problem comes
in if any changes are made to the student guide - all new page numbers and
re-doing all this work of making images and inserting them in just the right
places (I did learn how to work a macro now...)

Thanks for any assistance.
Denise
Doug Robbins - Word MVP - 26 Dec 2006 06:32 GMT
I created this for someone else who want to do something similar.

   Dim sourcea As Document, sourceb As Document, target As Document, Pages
As Integer, Counter As Integer, targetrange As Range 'targetrange added

   Dim evenpage As Range

   Set sourcea = Documents.Open(FileName:="...")

   sourcea.Repaginate

   Pages = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)

   MsgBox Pages

   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 'Assumed to be the document containing the even
pages

       Selection.EndKey Unit:=wdStory 'Line of code added to start from the
end of the document

       ActiveDocument.Bookmarks("\page").Range.Copy

       Set targetrange = target.Range

       targetrange.Start = targetrange.End

       targetrange.Paste

       targetrange.Start = targetrange.End

       targetrange.InsertBreak Type:=wdPageBreak

       Set evenpage = ActiveDocument.Bookmarks("\page").Range

       evenpage.Start = evenpage.Start - 1

       evenpage.Delete

       Counter = Counter + 1

   Wend

   sourcea.Close wdDoNotSaveChanges

   sourceb.Close wdDoNotSaveChanges

To get the page numbering that you want, I would use an Odd Page Header that
contains the following field construction

{ = { PAGE } / 2 }

You must use Ctrl+F9 to insert each pair of field delimiters { } and Alt+F9
to toggle off their display.

Signature

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

> How can I take two Word docs and merge them together so doc 1 is on the
> left-hand (even numbered) pages and doc 2 is on the right-hand (odd
[quoted text clipped - 23 lines]
> Thanks for any assistance.
> Denise
gambledcat - 26 Dec 2006 12:58 GMT
Doug - wonderful, thanks for the quick reply. I haven't worked with code in
in Word (or windows for that matter) - I will hunt around for how to apply
this. If you have a quick reference that would be great.

> I created this for someone else who want to do something similar.

[snip]>
> > How can I take two Word docs and merge them together so doc 1 is on the
> > left-hand (even numbered) pages and doc 2 is on the right-hand (odd
> > numbered)
> > pages? AND, if I can do this, is there a way to a) have doc 2 maintain its
> > unique page numbers? (hey, its christmas...miracle time, right?)
[snip]
Graham Mayor - 26 Dec 2006 13:20 GMT
http://www.gmayor.com/installing_macro.htm

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Doug - wonderful, thanks for the quick reply. I haven't worked with
> code in in Word (or windows for that matter) - I will hunt around for
[quoted text clipped - 18 lines]
>>> time, right?)
> [snip]
gambledcat - 26 Dec 2006 13:41 GMT
yay! thank you so much......a thousand blessings...

> http://www.gmayor.com/installing_macro.htm
>
[quoted text clipped - 20 lines]
> >>> time, right?)
> > [snip]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.