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 / September 2004

Tip: Looking for answers? Try searching our database.

SEPERATE DOCUMENTS FOR MAIL MERGE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MARINA MORENO - 03 Sep 2004 22:08 GMT
I CREATED A MAIL MERGE, AND I WANT TO FIND OUT IF THERE
IS A WAY TO SEPERATE THE DOCUMENTS RATHER THAN ONE HUGE
DOCUMENT? I AM NOT FAMILIAR WITH MACROS, IS THERE ANY
OTHER WAY TO DO THIS?
Doug Robbins - 04 Sep 2004 00:08 GMT
Please don't SHOUT!

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, Source as Document, Target as
Document, Letter as Range
Set Source = ActiveDocument
Letters = Source.Sections.Count
For i = 1 to Letters
Set Letter = Source.Sections(i).Range
Letter.End=Letter.End-1
Set Target = Documents.Add
   Target.Range=Letter
   Target.SaveAs FileName:="Letter" & i, FileFormat:= _
       wdFormatDocument, LockComments:=False, Password:="",
AddToRecentFiles:= _
       True, WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:= _
       False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
       SaveAsAOCELetter:=False
   Target.Close
Next i

End Sub

If you don't know what to do with it, see the article "What do I do with
macros sent to me by other newsgroup readers to help me out?" at:

http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

Signature

Please respond to the Newsgroup for the benefit of others who may be
interested.   Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP

>I CREATED A MAIL MERGE, AND I WANT TO FIND OUT IF THERE
> IS A WAY TO SEPERATE THE DOCUMENTS RATHER THAN ONE HUGE
> DOCUMENT? I AM NOT FAMILIAR WITH MACROS, IS THERE ANY
> OTHER WAY TO DO THIS?

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.