troubleshooting Question

Need to sepaerate a word merge into seperate pages and send to printer

Avatar of Marc_Johnson
Marc_Johnson asked on
Microsoft Word
7 Comments2 Solutions683 ViewsLast Modified:
Hi.  I have a Word 2003 mail merge document (running on a Vista PC) that gets sent to a fax application via a print job.  I need each page to be sent as a separate job/page so that each page is faxed to the correct recipient. I have created the below macro to use, but it is not sending individual pages as I believe it should. Please assist!!

The options that are commented out within the loop did not produce the desired results either. If there were 4 peopl ein the mail merge data source it would send one 4 page document to the Fax Printer...

Sub SendFax()
 
'Attribute SendFax.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.SendFax"
'Remove comments from appropriate lines for your configuration
'Adjust FaxPrinter variable for your RightFAX Printer (without prompts)
 
Dim TotalSec, i, CurrentSection
Dim OldPrinter 'Used to store old printer name
Dim FaxPrinter 'Can be customized for RightFAX Printer (no messages) name
Dim F$
 
FaxPrinter = "\\LVCCFAX1\HPFAX"
 
OldPrinter = ActivePrinter
Application.ActivePrinter = FaxPrinter
 
For i = 1 To wdNumberOfPagesInDocument
 
F$ = S + Str(i)
   
   'ActiveDocument.PrintOut Range:=F$, Copies:=1, Pages:=F$
   'Application.PrintOut Range:=wdPrintRangeOfPages, Copies:=1, Pages:=F$ ', PageType:=wdPrintAllPages
   ActiveDocument.PrintOut Range:=wdPrintFromTo, From:=F$, To:=F$
 
Next i
 
Application.ActivePrinter = OldPrinter
End Sub
ASKER CERTIFIED SOLUTION
Marc_Johnson

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros