Saving multiple documents in a folder

G

Guest

Hi All.

I have about 20 standard letters in mail merge. Each standard letters are
addressed to 20 individual persons. How do I automatically save each file to
one folder wihtout going to File Save as then typing up each persons name?
I am using Word 2003. I saw the following code on this forum but it does not
seem to work. I did not see any of the files on desk top or in my documents
at all

' splitter Macro

' Macro created by Doug Robbins to save each letter created by a mailmerge


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
 
D

Doug Robbins - Word MVP

The code in that macro will split a document that is created by executing a
mail merge to a new document when the macro is run while that new document
is the active document.

See the "Individual Merge Letters" item on fellow MVP Graham Mayor's website
at:

http://www.gmayor.com/individual_merge_letters.htm

As you are using Word 2003, the "Add-in to Merge Letters to Separate Files"
that I have written and that can be downloaded from that site will allow you
to create each letter as a separate file with a filename taken from a field
in the data source with a minimum of fuss.


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top