I now have the macros in VBA. Thank you again! But now I am trying to Print
to PDF. It is pulling the correct name for the save as but I can't figure
out how to have the save button to be scripted. I would like this to be
fully automated. Here is my code.
Sub Test1()
' splitter Macro modified to save individual letters with
' information from data source. The filename data must be added to
' the top of the merge letter - see web article.
Selection.EndKey Unit:=wdStory
Letters = Selection.Information(wdActiveEndSectionNumber)
Selection.HomeKey Unit:=wdStory
Counter = 1
While Counter < Letters
Application.ScreenUpdating = False
With Selection
.HomeKey Unit:=wdStory
.EndKey Unit:=wdLine, Extend:=wdExtend
.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
End With
sName = Selection
Docname = "F:\ia\Monthly\Merge\" & sName & ".doc"
ActiveDocument.Sections.First.Range.Cut
Documents.Add
With Selection
.Paste
.HomeKey Unit:=wdStory
.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
.Delete
End With
ActiveDocument.SaveAs FileName:=Docname, _
FileFormat:=wdFormatDocument
ActiveWindow.Close
Counter = Counter + 1
Application.ScreenUpdating = True
ActivePrinter = "Acrobat PDFWriter"
Application.PrintOut FileName:=Docname, Range:=wdPrintAllDocument,
Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
Wend
End Sub
> Thank you so much! This really helps! I will test your macros today!
>
[quoted text clipped - 24 lines]
> > >
> > > Amy
Doug Robbins - Word MVP - 12 Jun 2006 19:06 GMT
What version of Word are you using? If it is XP or later, the addin that I
have created that you can download from Graham's site has all of the
necessary code in it.

Signature
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
>I now have the macros in VBA. Thank you again! But now I am trying to
>Print
[quoted text clipped - 84 lines]
>> > >
>> > > Amy
Amy - 12 Jun 2006 20:04 GMT
I am using Word 2002. Will the add-ins work for this version?
> What version of Word are you using? If it is XP or later, the addin that I
> have created that you can download from Graham's site has all of the
[quoted text clipped - 88 lines]
> >> > >
> >> > > Amy
Peter Jamieson - 12 Jun 2006 21:12 GMT
Word 2002 is another name for Word XP.
Peter Jamieson
>I am using Word 2002. Will the add-ins work for this version?
>
[quoted text clipped - 97 lines]
>> >> > >
>> >> > > Amy