Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Thank you, Doug and Graham. The updated template solves my problem.
Doug Robbins - Word MVP wrote: Thanks, Graham. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Merging multiple images to a page | Mailmerge | |||
Section of a Word Document Fails to Print and Drops Out of Attachm | Microsoft Word Help |