Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2007

Tip: Looking for answers? Try searching our database.

printing current page not working properly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eric - 13 Nov 2007 22:10 GMT
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
Julie - 16 Nov 2007 16:06 GMT
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

> Hi!
>
[quoted text clipped - 17 lines]
>
> /e
eric - 18 Nov 2007 22:51 GMT
Brilliant if it works!

Thx, I'll give it a try.

Best
/e

> 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
[quoted text clipped - 28 lines]
>>
>> /e
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.