Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Fred from NYC
 
Posts: n/a
Default Mail merge fails with images and section breaks

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.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Mail merge fails with images and section breaks

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.

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

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



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



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Mail merge fails with images and section breaks

Thanks, Graham.

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

"Graham Mayor" wrote in message
...
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.





  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Fred from NYC
 
Posts: n/a
Default Mail merge fails with images and section breaks

Thank you, Doug and Graham. The updated template solves my problem.

Doug Robbins - Word MVP wrote:
Thanks, Graham.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging multiple images to a page JohnB Mailmerge 10 August 21st 05 12:51 PM
Section of a Word Document Fails to Print and Drops Out of Attachm Manannan Microsoft Word Help 0 March 13th 05 02:31 PM


All times are GMT +1. The time now is 01:13 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"