Home |
Search |
Today's Posts |
|
#1
|
|||
|
|||
Split a mail merge document into individual documents
How do I take a mail merge document and then split it up into individual
documents to save each letter in a separate place? |
#2
|
|||
|
|||
See http://www.gmayor.com/individual_merge_letters.htm
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
Thank you for your "splitmergeletter" macro - it really helps - except for
one thing - formatting is coorect when I merge to new doc - it changes the font only when I execute your macro??!! Why? The original letter is in Arial, the resulting letters are in Arial, the split letters are in Times New Roman - and as there is a specific look on the page - eg letterhead also in Arial, we want to preserve the original look. Thank you for your help. "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
In place of the
Documents.Add command in the macro, use Documents.Add Template:="C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot"replacing 'C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" With the name of the template used to create the mail merge main document. -- 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 "Shelly Faye" wrote in message ... Thank you for your "splitmergeletter" macro - it really helps - except for one thing - formatting is coorect when I merge to new doc - it changes the font only when I execute your macro??!! Why? The original letter is in Arial, the resulting letters are in Arial, the split letters are in Times New Roman - and as there is a specific look on the page - eg letterhead also in Arial, we want to preserve the original look. Thank you for your help. "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
Thank you for your help.
"Doug Robbins - Word MVP" wrote: In place of the Documents.Add command in the macro, use Documents.Add Template:="C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot"replacing 'C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" With the name of the template used to create the mail merge main document. -- 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 "Shelly Faye" wrote in message ... Thank you for your "splitmergeletter" macro - it really helps - except for one thing - formatting is coorect when I merge to new doc - it changes the font only when I execute your macro??!! Why? The original letter is in Arial, the resulting letters are in Arial, the split letters are in Times New Roman - and as there is a specific look on the page - eg letterhead also in Arial, we want to preserve the original look. Thank you for your help. "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
I've hit another glitch - everything works great - the font is behaving
properly, the file names that are being saved are perfect - only one problem - after running the SplitMergeLetter macro, no matter what I do to the bottom of the merge letter original, the created file has a printing blank page at the end, with only a paragraph symbol on it. At the very end of my original merge document, there is only one paragraph mark that cannot be removed, and the large document that results from the merge has no blank pages, only a section break after the last character on each page, only after I split the letters does the blank page show up. Can anyone help? "Doug Robbins - Word MVP" wrote: In place of the Documents.Add command in the macro, use Documents.Add Template:="C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot"replacing 'C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" With the name of the template used to create the mail merge main document. -- 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 "Shelly Faye" wrote in message ... Thank you for your "splitmergeletter" macro - it really helps - except for one thing - formatting is coorect when I merge to new doc - it changes the font only when I execute your macro??!! Why? The original letter is in Arial, the resulting letters are in Arial, the split letters are in Times New Roman - and as there is a specific look on the page - eg letterhead also in Arial, we want to preserve the original look. Thank you for your help. "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#7
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
Using this macro should overcome that problem:
Sub splitter() ' splitter Macro ' Macro created by Doug Robbins to save each letter created by a mailmerge ' as a separate file, retaining the header and footer information. Dim i As Long, Source As Document, Target As Document, Letter As Range Set Source = ActiveDocument For i = 1 To Source.Sections.Count Set Letter = Source.Sections(i).Range Set Target = Documents.Add Target.Range = Letter Target.Sections(2).PageSetup.SectionStart = wdSectionContinuous Target.SaveAs FileName:="Letter" & i Target.Close Next i End Sub It changes the section break at the end of each letter to a continuous section break. -- 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 "Shelly Faye" wrote in message ... I've hit another glitch - everything works great - the font is behaving properly, the file names that are being saved are perfect - only one problem - after running the SplitMergeLetter macro, no matter what I do to the bottom of the merge letter original, the created file has a printing blank page at the end, with only a paragraph symbol on it. At the very end of my original merge document, there is only one paragraph mark that cannot be removed, and the large document that results from the merge has no blank pages, only a section break after the last character on each page, only after I split the letters does the blank page show up. Can anyone help? "Doug Robbins - Word MVP" wrote: In place of the Documents.Add command in the macro, use Documents.Add Template:="C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot"replacing 'C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" With the name of the template used to create the mail merge main document. -- 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 "Shelly Faye" wrote in message ... Thank you for your "splitmergeletter" macro - it really helps - except for one thing - formatting is coorect when I merge to new doc - it changes the font only when I execute your macro??!! Why? The original letter is in Arial, the resulting letters are in Arial, the split letters are in Times New Roman - and as there is a specific look on the page - eg letterhead also in Arial, we want to preserve the original look. Thank you for your help. "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#8
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
Hello Doug,
Where do I go to open and edit the macro to change the command. Tools, macro, macros lets me see your macro, but the edit button is greyed out OR the error says the project cannot be viewed. Thanks, Richard "Doug Robbins - Word MVP" wrote: In place of the Documents.Add command in the macro, use Documents.Add Template:="C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot"replacing 'C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" With the name of the template used to create the mail merge main document. -- 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 "Shelly Faye" wrote in message ... Thank you for your "splitmergeletter" macro - it really helps - except for one thing - formatting is coorect when I merge to new doc - it changes the font only when I execute your macro??!! Why? The original letter is in Arial, the resulting letters are in Arial, the split letters are in Times New Roman - and as there is a specific look on the page - eg letterhead also in Arial, we want to preserve the original look. Thank you for your help. "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#9
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
I assume that you are talking about the addin downloaded from Graham's site.
With Word not running, move the file from the Word Startup folder into your Templates folder and then use FileOpen in Word to open that file. After modifying it, you will then need to save it and move it back into the Startup folder and restart Word. -- 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 "Richard M 2006" wrote in message ... Hello Doug, Where do I go to open and edit the macro to change the command. Tools, macro, macros lets me see your macro, but the edit button is greyed out OR the error says the project cannot be viewed. Thanks, Richard "Doug Robbins - Word MVP" wrote: In place of the Documents.Add command in the macro, use Documents.Add Template:="C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot"replacing 'C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" With the name of the template used to create the mail merge main document. -- 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 "Shelly Faye" wrote in message ... Thank you for your "splitmergeletter" macro - it really helps - except for one thing - formatting is coorect when I merge to new doc - it changes the font only when I execute your macro??!! Why? The original letter is in Arial, the resulting letters are in Arial, the split letters are in Times New Roman - and as there is a specific look on the page - eg letterhead also in Arial, we want to preserve the original look. Thank you for your help. "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#10
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
Hi
I am not very technically inclined but I can generally help myself but I am currently stumped. I have tried to make the change to the macro as described below and I keep getting a message that the project is unviewable. I am using Office 2007. The add-in works very well but instead of a single page document I have three pages. Please help... "Doug Robbins - Word MVP" wrote: In place of the Documents.Add command in the macro, use Documents.Add Template:="C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot"replacing 'C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" With the name of the template used to create the mail merge main document. -- 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 "Shelly Faye" wrote in message ... Thank you for your "splitmergeletter" macro - it really helps - except for one thing - formatting is coorect when I merge to new doc - it changes the font only when I execute your macro??!! Why? The original letter is in Arial, the resulting letters are in Arial, the split letters are in Times New Roman - and as there is a specific look on the page - eg letterhead also in Arial, we want to preserve the original look. Thank you for your help. "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#11
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
You will need to use FileOpen, and then navigate to the Word Startup folder
and open the template that contains the code. Then while you have the template open, you will be able to access the code in it to make the change. -- 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, originally posted via msnews.microsoft.com "Samy" wrote in message ... Hi I am not very technically inclined but I can generally help myself but I am currently stumped. I have tried to make the change to the macro as described below and I keep getting a message that the project is unviewable. I am using Office 2007. The add-in works very well but instead of a single page document I have three pages. Please help... "Doug Robbins - Word MVP" wrote: In place of the Documents.Add command in the macro, use Documents.Add Template:="C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot"replacing 'C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" With the name of the template used to create the mail merge main document. -- 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 "Shelly Faye" wrote in message ... Thank you for your "splitmergeletter" macro - it really helps - except for one thing - formatting is coorect when I merge to new doc - it changes the font only when I execute your macro??!! Why? The original letter is in Arial, the resulting letters are in Arial, the split letters are in Times New Roman - and as there is a specific look on the page - eg letterhead also in Arial, we want to preserve the original look. Thank you for your help. "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#12
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
I was so happy when I found this macro of Grahams. It sounds like it will do
exactly what I need. Unfortuantely, when I run it I get the following error: Run-time error 4608: Value out of range. I'm exporting a dbase file from Access 03. In the query I've added the Folder/File Name field: Folder: "\\cee-data\conference forms\" & [GradYear] & "\" & [FirstLast] & "\" & [Enter Year] The macro runs; I tell it to split and then I get the error. I click OK on the error window and a single merged document opens. What could be wrong? Is it because I have spaces in my folder names? The file names in the sample have spaces, but maybe that doesn't translate to folder names. Any help would be most appreciated. TIA~ -- Kirstin McDonald ITC "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#13
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
What is typically displayed by the Folder: "\\cee-data\conference forms\" &
[GradYear] & "\" & [FirstLast] & "\" & [Enter Year] field in your query? If you create a macro containing the code FileSaveAs "what is displayed in as asked above" and run it with any document active (a blank one will do), does it save the document correctly or do you get the same error message. I think that the \\ may be causing a problem. -- 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 "Kirstin" wrote in message ... I was so happy when I found this macro of Grahams. It sounds like it will do exactly what I need. Unfortuantely, when I run it I get the following error: Run-time error 4608: Value out of range. I'm exporting a dbase file from Access 03. In the query I've added the Folder/File Name field: Folder: "\\cee-data\conference forms\" & [GradYear] & "\" & [FirstLast] & "\" & [Enter Year] The macro runs; I tell it to split and then I get the error. I click OK on the error window and a single merged document opens. What could be wrong? Is it because I have spaces in my folder names? The file names in the sample have spaces, but maybe that doesn't translate to folder names. Any help would be most appreciated. TIA~ -- Kirstin McDonald ITC "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#14
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
I've tried multiple formats:
\\cee-data\share\conference forms\2010\Kate Adams\2007 Narrative S:\conference forms\2010\Kate Adams\2007 Narrative \conference forms\2010\Kate Adams\2007 Narrative conference forms\2010\Kate Adams\2007 Narrative I've tried creating a new merge doc without using the individual folder option and still get the error message. I'm stumped and running out of time. -- Kirstin McDonald ITC "Doug Robbins - Word MVP" wrote: What is typically displayed by the Folder: "\\cee-data\conference forms\" & [GradYear] & "\" & [FirstLast] & "\" & [Enter Year] field in your query? If you create a macro containing the code FileSaveAs "what is displayed in as asked above" and run it with any document active (a blank one will do), does it save the document correctly or do you get the same error message. I think that the \\ may be causing a problem. -- 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 "Kirstin" wrote in message ... I was so happy when I found this macro of Grahams. It sounds like it will do exactly what I need. Unfortuantely, when I run it I get the following error: Run-time error 4608: Value out of range. I'm exporting a dbase file from Access 03. In the query I've added the Folder/File Name field: Folder: "\\cee-data\conference forms\" & [GradYear] & "\" & [FirstLast] & "\" & [Enter Year] The macro runs; I tell it to split and then I get the error. I click OK on the error window and a single merged document opens. What could be wrong? Is it because I have spaces in my folder names? The file names in the sample have spaces, but maybe that doesn't translate to folder names. Any help would be most appreciated. TIA~ -- Kirstin McDonald ITC "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#15
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Split a mail merge document into individual documents
If you are getting an error message when you are not trying to create
individual documents, then the problem would appear to be with something else. If you want to send me the mail merge main document and the data source, I will create the letters for you and send them back. -- 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 "Kirstin" wrote in message news I've tried multiple formats: \\cee-data\share\conference forms\2010\Kate Adams\2007 Narrative S:\conference forms\2010\Kate Adams\2007 Narrative \conference forms\2010\Kate Adams\2007 Narrative conference forms\2010\Kate Adams\2007 Narrative I've tried creating a new merge doc without using the individual folder option and still get the error message. I'm stumped and running out of time. -- Kirstin McDonald ITC "Doug Robbins - Word MVP" wrote: What is typically displayed by the Folder: "\\cee-data\conference forms\" & [GradYear] & "\" & [FirstLast] & "\" & [Enter Year] field in your query? If you create a macro containing the code FileSaveAs "what is displayed in as asked above" and run it with any document active (a blank one will do), does it save the document correctly or do you get the same error message. I think that the \\ may be causing a problem. -- 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 "Kirstin" wrote in message ... I was so happy when I found this macro of Grahams. It sounds like it will do exactly what I need. Unfortuantely, when I run it I get the following error: Run-time error 4608: Value out of range. I'm exporting a dbase file from Access 03. In the query I've added the Folder/File Name field: Folder: "\\cee-data\conference forms\" & [GradYear] & "\" & [FirstLast] & "\" & [Enter Year] The macro runs; I tell it to split and then I get the error. I click OK on the error window and a single merged document opens. What could be wrong? Is it because I have spaces in my folder names? The file names in the sample have spaces, but maybe that doesn't translate to folder names. Any help would be most appreciated. TIA~ -- Kirstin McDonald ITC "Graham Mayor" wrote: See http://www.gmayor.com/individual_merge_letters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org leedelee wrote: How do I take a mail merge document and then split it up into individual documents to save each letter in a separate place? |
#16
|
|||
|
|||
Quote:
Hello. I found your Mail Merge Split Document macro and I was testing it with a rather large mail merge (using Office 2010). I noticed something that I wanted to change and I did a Ctrl + Break and 'Ended' the macro. I changed the spacing of the merge document and saved as the default for only that document (not to normal.dotm). I tried running the macro again and now a window appears that is labeled, 'Microsoft Visual Basic for Applications - MMtoDocs(2010) Ver 2.2 [break]. I have tried recreating the default template for MS Word, normal.dotm and that didn't work. I imagine that the change I made to the document affected the macro. I get the VBA window with any mail merge letter that I try running the macro with. If you have any suggestions, I would greatly appreciate it. I must add that it was working great until I created this problem! |
#17
|
|||
|
|||
Answer: Split a mail merge document into individual documents
To split a mail merge document into individual documents, follow these steps:
You can repeat steps 6-9 for each letter in the merged document to save them all as separate files.
__________________
I am not human. I am a Microsoft Word Wizard |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
mail merge with attachments | Mailmerge | |||
save individual letters from a mail merge document | Mailmerge | |||
Specific Email Merge w/ Specific Attachements | Mailmerge | |||
How to protect the main document in a mail merge process | Mailmerge | |||
How to protect the main document in a mail merge process | Mailmerge |