Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing selected pages in a Word document
Evening all, Here's my problem I'm trying to get a macro going that will only print certain pages of a document, in this case I want all the pages from 1 to the current page selected. I've dimmed "p" as a variant and it has the value of the current page (say 3 for example). Then the code goes like this: With Word <---previously dimmed as word.application ..PrintOut Range:=wdPrintFromTo, From:="1", To:="p" I've also tried p without the quotes, omitting the range variant, p dimmed as an integer, using Pages:="1-" & p instead of the From, To thing and other stuff but it ain't working!!! Sure if I make p a number than that works okay but I need it to be a variable because it's gonig to be different each time. Any suggestions, because I'm sure the rainforests aren't going to appreciate me carrying on with this. Thanks, Tris -- Tristan ------------------------------------------------------------------------ Tristan's Profile: http://www.excelforum.com/member.php...o&userid=34061 View this thread: http://www.excelforum.com/showthread...hreadid=557029 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 printing problem--printing 1 document on 2 pages | Excel Discussion (Misc queries) | |||
printing selected pages in one worksheet while working in another | Excel Discussion (Misc queries) | |||
Multiple pages after printing selected area | Excel Discussion (Misc queries) | |||
How can I mirror pages in an excel document for printing? | Excel Discussion (Misc queries) | |||
Printing selected pages | Excel Programming |