View Full Version : Print Current Page code problem
Hello! Need help please. Using the following print current page macro in Word 2003 but it's not working -- entire document is printing. Any suggestions?
ActiveDocument.PrintOut Range:=wdPrintCurrentPage
Thanks much!
lucas
06-02-2005, 07:35 PM
I don't have 2003 but this works for me in 2000:
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage
I put it in a module in my normal dot
xCav8r
06-02-2005, 07:46 PM
Are you, by chance, pointing to the microsoft image printer thingee? When I do that, it always sends all pages, but if I send to an actual printer, it limits it according to the constant I specify.
MOS MASTER
06-03-2005, 10:09 AM
Hi and Welcome to VBAX! :hi:
This Kb entry by our Princess does the same as what the boys before me told you...as an add some extra instructions how to use:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=182
Enjoy! :whistle:
This works on a new document in Word; however, in existing documents, I still cannot print current page only -- entire document is being sent to print.
Not using Microsoft Office Document Image Writer.
I would appreciate any other suggestions.
Thanks!
MOS MASTER
06-06-2005, 10:30 AM
This works on a new document in Word; however, in existing documents, I still cannot print current page only -- entire document is being sent to print.
Hi, :yes
This is mighty strange!
Are you sure the insertion point (blinking cursor thingie in the document) is blinking in the page you say is the current page? (The one you'd like to print)
What is your Office version?
Later..:whistle:
Affirmative. Office XP/Windows 2003/iManage DMS.
I discovered something else. The macro actually works on new documents not yet saved and locally saved documents; however, the macro does not work as expected on documents saved to our DMS.
Thanks.
MOS MASTER
06-06-2005, 11:39 AM
Affirmative. Office XP/Windows 2003/iManage DMS.
I discovered something else. The macro actually works on new documents not yet saved and locally saved documents; however, the macro does not work as expected on documents saved to our DMS.
Thanks.
Hi, :yes
Well beats the hell out of me..never seen this behaviour before...(Office XP and 2003 here aswell)
Ok I've coded you a custom current page sub which should work:
Sub AlternativeCurrentPagePrint()
Dim sTotal As String
sTotal = Selection.Information(wdActiveEndAdjustedPageNumber)
ActiveDocument.PrintOut Range:=wdPrintFromTo, _
From:=sTotal, _
To:=sTotal
End Sub
Enjoy! :whistle:
fumei
06-06-2005, 01:31 PM
Since you are posting code solutions, how about just trying...
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage
MOS MASTER
06-06-2005, 01:34 PM
Since you are posting code solutions, how about just trying...
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage
Hahaha...code has been posted three times now in this thread! :rofl: :rotlaugh:
fumei
06-08-2005, 09:37 AM
Very funny.
MOS MASTER
06-08-2005, 09:40 AM
Very funny.
Sorry Gerry...as usual I couldn't help myself! :rofl:
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.