Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change the wdFilePrintOut Printer box?

Status
Not open for further replies.

excellover

Technical User
Nov 15, 2002
10
CA
Hi guys,
what I want to do is to change the printer box to the printer I need before the file print window pops up, I am wondering why I can not acheive this with the following code

my code:
sub pt()
set it=dialogs(wdFilePrintOut)
with it
.Printer="HP Jet three"
.show
end with
set it = nothing
end sub

thanks
 
I don't know. In my Word2000, the names of the dialog constants are different, but I also can't seem to access the printer name from the dialog. However, you can set the printer simply using

ActivePrinter="(your printer name)"

If you need to, you can save the active printer, and restore the value when you're done.
Rob
[flowerface]
 
Thanks, the reason I do not want to use Activeprinter is that it take forever, my computer is too slow for this.
 
I wouldn't think that the METHOD by which you set the active printer would have much to do with the speed at which it happens. In fact, I've had rather slow response as well when manually changing the printer using the print dialog. But then, I've not had much need to print and manipulate printers programmatically...
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top