View Single Post
  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default 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?