S
Stevebo
I can't seem to get Word VBA to print out anything except my entire
document, and then, only to a printer.
Ideally, I'd like to print a .pdf of say, pages 1, 3, 8, 22, 23, 27
The variable Disp2 is set to "1, 3, 8, 22, 23, 27" (changes depending
on document)
But the following code prints the entire document:
'To file
ActiveDocument.ActiveWindow.PrintOut _
PrintTofile:=True, OutputFileName:=fn, Range:=wdPrintRangeOfPages,
Pages:=Disp2
'To printer
ActiveDocument.ActiveWindow.PrintOut _
Range:=wdPrintRangeOfPages, Pages:=Disp2
What am I missing?
Thanks,
Steve
document, and then, only to a printer.
Ideally, I'd like to print a .pdf of say, pages 1, 3, 8, 22, 23, 27
The variable Disp2 is set to "1, 3, 8, 22, 23, 27" (changes depending
on document)
But the following code prints the entire document:
'To file
ActiveDocument.ActiveWindow.PrintOut _
PrintTofile:=True, OutputFileName:=fn, Range:=wdPrintRangeOfPages,
Pages:=Disp2
'To printer
ActiveDocument.ActiveWindow.PrintOut _
Range:=wdPrintRangeOfPages, Pages:=Disp2
What am I missing?
Thanks,
Steve