How to mail merge selected pages of a document?

C

cyberdude

Hi,

I have a document having 3 pages. On the last page, it somewhere
holds a company name which changes and depends on the input record.

Suppose that I now have 3 records containing 3 different company
names. I want to do mail merge on the original document using the 3
records so that the resulting mail merged document has 5 pages in
which the first 2 pages are the same as those of the original document
and the remaining pages contain bascially the last page of the
original document but they show a different company name on each
page. Is that possible by mail merge?

An example is shown below:

Origial document may look like this:

.....The weather is fine today....
..............................................
P.1

.....The beach is beautiful.........
..............................................
P.2

.....Microsoft is a big company..
..............................................
P.3

The resulting document should look like this:
.....The weather is fine today....
..............................................
P.1

.....The beach is beautiful.........
..............................................
P.2

.....Microsoft is a big company..
..............................................
P.3

.....Oracle is a big company..
..............................................
P.4

.....Google is a big company..
..............................................
P.5

I hope the above example makes things clear.

Mike
 
D

Doug Robbins - Word MVP

That cannot really be done with mail merge. I would suggest that you use a
form letter type mail merge main document, then execute the merge to a new
document and the to just print the first two pages and the third page of
each letter, use a macro that contains the following code:

Dim i As Long
With ActiveDocument
.PrintOut Range:=wdPrintFromTo, From:="s1", To:="s1"
For i = 2 To .Sections.Count
.PrintOut Range:=wdPrintFromTo, From:="p3s" & i, To:="p3s" & i
Next i
End With


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

cyberdude

Hi Doug,

Thanks for your reply. So, mail merge can't do merging on selected
pages in my case according to your answer.

I think I'll take a similar approach as what you suggested but I'll
delete the extra pages by a macro instead of printing the needed pages
to a new document. May I ask if you or someone else know the macro
that highlights the text from the cursor's current position to any
specific word, let say "name", in the word document? I hope to use
this macro to delete the extra pages by several key strokes. Thank
you.

Mike
 

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