printing current page not working properly

E

eric

Hi!

I have a macro that prints the current page:

ActiveDocument.PrintOut Range:=wdPrintCurrentPage

It works most of the time but in some cases with some documents (many
sections and spooky numbering) it instead prints the previous page.

I have tried this code but it also fails from time to time:

Range:=wdPrintRangeOfPages
Pages:=CStr(Selection.Information(wdActiveEndPageNumber))

I have Word 2003.

Any suggestions?

Thx.

/e
 
J

Julie

Hi Eric, I encountered this problem with Word 2003 as well (with some code
behind a userform). There was absolutely no logic to the problem and it
appeared for a while to be un-resolvable. After hacking around to find an
obvious workaround, I found a less-obvious workaround - that is have the
macro temporarily switch to normal view before sending the print, then
restore the view to original setting after the print. That solution seems
improbable, but it was the only thing I found to correct the problem.
Possibly there's a better workaround, but i don't have time to find it so
will stay with the view switch for now. Hopefully it works for your
application. Regards, Julie
 

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