mahalakshmi_s
asked on
Mail Merge in VBA
Hi,
I want SINGLE DOCUMENT as output.This single doc must have one letter every page. My following code produces a letter in separate document. Pls give the code where i can create one single doc with all letters/page.
This is VBA scipt in word.
Thanks
M
Set New Document and save it with EventNbr postfix
Set NewDoc = ActiveDocument
Savepath$ = exepath$
File_Name$ = Savepath$ + "\Train2_OutputFile" + CurrRec$
NewDoc.SaveAs FileName:=File_Name$
NewDoc.Close
If CurrentRecord < EndRecord Then
MainDoc.Close SaveChanges:=wdDoNotSaveCh anges
WordBasic.FileNew template:=template$
End If
I want SINGLE DOCUMENT as output.This single doc must have one letter every page. My following code produces a letter in separate document. Pls give the code where i can create one single doc with all letters/page.
This is VBA scipt in word.
Thanks
M
Set New Document and save it with EventNbr postfix
Set NewDoc = ActiveDocument
Savepath$ = exepath$
File_Name$ = Savepath$ + "\Train2_OutputFile" + CurrRec$
NewDoc.SaveAs FileName:=File_Name$
NewDoc.Close
If CurrentRecord < EndRecord Then
MainDoc.Close SaveChanges:=wdDoNotSaveCh
WordBasic.FileNew template:=template$
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.