View Single Post
  #13   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default Merge to seperate documents

Use

Sub splitter()

' Macro created by Doug Robbins to save each letter created by a mailmerge
as a separate file.

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
Letter.End=Letter.End-1
Set Target = Documents.Add
Target.Range=Letter
Target.SaveAs FileName:="Letter" & i
Target.Close
Next i

End Sub


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

"Manoj Talwar" wrote in message
...

I was looking for a code that would enable me to split multiple pages in
a merged document to separate documents for example I have a template
with 3 pages - when merged using a normal mail-merge for 5 people, it
creates a merged document with 15 pages (i.e. 5 people with 3 pages
each). Now when I use a macro "Splitter" from the Topic "Individual
Merge Letters", it splits the documents one page at a time creating 15
documents in this caserather than 5 documents.

Any suggestions pls.

Kind regards,
Manoj


--
Manoj TalwarPosted from - http://www.officehelp.in