Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have the below macro, which is intended to loop through all possible values in the "managerName" field and then print each of those files to the printer.
Currently, it stops after just one run through (rather than looping) and I cannot figure out how to get it to print (I have set up a report called Report1) - the printer name setup on my pc is CutePDF Writer (should print to PDF).
Can you help?
Thanks
sub SubmitReport
Set val=ActiveDocument.Fields("managerName").GetPossibleValues(20000)
For i = 1 to Val.count - 1
ActiveDocument.Fields("managerName").Select val.item(i).Text
' Print Report
ActiveDocument.PrintReport Report1, "CutePDF Writer"
Next
ActiveDocument.ClearAll true
MsgBox ("loop done")
end sub
Hi,
Go through the below links it might help u,
Thank you.
If I don't want to print to PDF, how would I send the report to a printer automatically?