View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor
 
Posts: n/a
Default Mail merge fails with images and section breaks

That works! I have updated the downloadable version - now MMtoDocsRev19

--

Graham Mayor - Word MVP

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


Doug Robbins - Word MVP wrote:
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.


"Fred from NYC" wrote in message
...
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.