I use MS Office 2003 and Windows XP. My goal is to create individual
documents with text, tables and images from a mail merge. Previously, I
used a SplitMerge macro that I found at the website of Graham Mayor:
http://www.gmayor.com/individual_merge_letters.htm
I would run the mail merge, update the document by pressing Ctrl+A and
F9, and then run the SplitMerge macro to create individual files. I am
now working with a document where some pages are portrait and others
landscape. Because the formatting is controlled by section breaks, the
SplitMerge macro breaks up the pages for each record into separate
sections, partly overwriting previously saved documents from earlier
records.
A partial solution to this problem was a template called
MMtoDocsRev18.dot by Doug Robbins that I found on the same page as the
SplitMerge macro (see URL above). The information for each record is
properly saved as an individual document, with the page orientations
intact. However, the images are not updated and all documents show the
same images from the first record. To display the correct images I have
to open each document individually and then press Ctrl+A and F9.
Is it possible to automatically update the images before the merged
document is split into individual files?
Many thanks for your help.
From the Tools menu, select Templates and add-ins and uncheck the box
against the MMtoDocsRev18 item. Then exit from that dialog and open that
template. With the template open, press Alt+F11 to open the Visual Basic
Editor and under the TemplateProject (MMtoDocsRev18) Project, expand the
Class Modules folder and select the MergeApplication. In the code window on
the right, scroll down to the Private Sub app_MailMergeAfterMerge(ByVal Doc
As Document, ByVal DocResult As Document) and add the following line of code
NewDoc.Range.Fields.Update
immediately before
NewDoc.SaveAs FldrPath & fnames(i)
Go back to the Word Document window and save the template and close it.
Then in the Templates and add-ins dialog, place a check mark against the
MMtoDocsRev18 item.
Now when you execute the merge to a new document and accept the Merge to
Individual Documents option, the image fields should be updated.
Post back here with the results.

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
>I use MS Office 2003 and Windows XP. My goal is to create individual
>documents with text, tables and images from a mail merge. Previously, I
[quoted text clipped - 22 lines]
>
> Many thanks for your help.
Graham Mayor - 04 Feb 2006 13:15 GMT
That works! I have updated the downloadable version - now MMtoDocsRev19

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> From the Tools menu, select Templates and add-ins and uncheck the box
> against the MMtoDocsRev18 item. Then exit from that dialog and open
[quoted text clipped - 44 lines]
>>
>> Many thanks for your help.
Doug Robbins - Word MVP - 04 Feb 2006 13:47 GMT
Thanks, Graham.

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
> That works! I have updated the downloadable version - now MMtoDocsRev19
>
[quoted text clipped - 46 lines]
>>>
>>> Many thanks for your help.
Fred from NYC - 04 Feb 2006 17:25 GMT
Thank you, Doug and Graham. The updated template solves my problem.
> Thanks, Graham.