Print dialog

A

Al

Hi Folks,

I wrote a little program that prints some information on sheets of A4
labels.

I hard coded it to print from tray 4 on our printer. The program that I
wrote
has increased in populatrity and people in other workgroups on the network
are now using it.

The problem is that we have a number of different printers in use, some dont
have tray 4 and many people dont have a dedicated tray for the labels.

I need to make the program more rebust and flexible so that it will work no
matter what the printer is that is installed.

I guess the best option is to present the user with the "print" dialog after
they
press the ok button on the userform that my code presents them with?

Also if possible I guess the user dialog should be preset to default for a
manual
feed?

Anybody else have any thoughts? Whats the code to show the print dialog?

Cheers

-Al
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Al,

See "Controlling the Printer from Word VBA Part 1: Using VBA to Select the
Paper Tray"

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=101

To show the file print dialog, you use:

Dialogs(wdDialogFilePrint).Show

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

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