Selecting specific pages to print

M

Michael Singmin

Hello Word VBA experts,

I know Excel VBA very well but this is my first posting to this group.
What is the Word VBA equivalent of printing specific pages of a
document ?

Thanks,

Michael Singmin
Pretoria
 
D

Doug Robbins - Word MVP

Hi Michael,

Check out the arguments for the .PrintOut method in tbe visual basic help
file to get the full story, but as an example:

ActiveDocument.ActiveWindow.PrintOut Range:=wdPrintFromTo, From:="1",
To:="3"

will print pages 1 to 3 of the document.

ActiveDocument.ActiveWindow.PrintOut Range:=wdPrintFromTo, From:="p1s2",
To:="p3s2"

will print the first, second and third pages in the second Section of the
document.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top