merge 2 docs-diff odd & even pages

G

gambledcat

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
 
D

Doug Robbins - Word MVP

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.

--
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
 
G

gambledcat

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.


Doug Robbins - Word MVP said:
I created this for someone else who want to do something similar.
[snip]>
--
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

gambledcat said:
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]
 
G

Graham Mayor

http://www.gmayor.com/installing_macro.htm

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
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.


Doug Robbins - Word MVP said:
I created this for someone else who want to do something similar.
[snip]>
--
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

gambledcat said:
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]
 
G

gambledcat

yay! thank you so much......a thousand blessings...

Graham Mayor said:
http://www.gmayor.com/installing_macro.htm

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
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.


Doug Robbins - Word MVP said:
I created this for someone else who want to do something similar.
[snip]>
--
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 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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top