Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / April 2004

Tip: Looking for answers? Try searching our database.

Mail merge to subsequent new documents.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sdbrennan - 02 Apr 2004 19:39 GMT
mail merging data from Access to word master document.  35
records, hence 35 seperate sheets in ONE word document.

How can I get each record to merge to a new document, thus
having 35 seperate files of the merged data.
Doug Robbins - Word MVP - 03 Apr 2004 02:39 GMT
Sub splitter()

' splitter Macro

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

Dim Letters As Integer, Counter As Integer
Letters = ActiveDocument.Sections.Count
Selection.HomeKey Unit:=wdStory
Counter = 1
While Counter < Letters
   DocName = "Myletter" & LTrim$(Str$(Counter))
   ActiveDocument.Sections.First.Range.Cut
   Documents.Add
   Selection.Paste
   ActiveDocument.Sections(2).PageSetup.SectionStart = wdSectionContinuous
   ActiveDocument.SaveAs FileName:=DocName, FileFormat:= _
       wdFormatDocument, LockComments:=False, Password:="",
AddToRecentFiles:= _
       True, WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:= _
       False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
       SaveAsAOCELetter:=False
   ActiveWindow.Close
   Counter = Counter + 1
Wend

End Sub

Signature

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP

> mail merging data from Access to word master document.  35
> records, hence 35 seperate sheets in ONE word document.
>
> How can I get each record to merge to a new document, thus
> having 35 seperate files of the merged data.
- 03 Apr 2004 17:56 GMT
many thanks

>-----Original Message-----
>Sub splitter()
[quoted text clipped - 34 lines]
>
>.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.