Selecting print option in vb

F

Feng

Hi,

In mail merging for labels, the labeloption box asks you select between dot matrix printer and laser printer. If Laser printer is chosen, then it asks you to chose the tray to print it out from. However in the createnewdocument method or printout method of mailinglabel, the lasertray property does not have a dot matrix printer option. Furthermore, the constants do not match the options that I get from the labeloption box tray combobox. So question is how may I select dot matrix printer option with vb or vba?
 
D

Doug Robbins - Word MVP

Hi Feng,

See the article "How can I get a list of the available printer names?" at:

http://www.mvps.org/word/FAQs/MacrosVBA/AvailablePrinters.htm

and other items in connection with printers at that site.

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
Feng said:
Hi,

In mail merging for labels, the labeloption box asks you select between
dot matrix printer and laser printer. If Laser printer is chosen, then it
asks you to chose the tray to print it out from. However in the
createnewdocument method or printout method of mailinglabel, the lasertray
property does not have a dot matrix printer option. Furthermore, the
constants do not match the options that I get from the labeloption box tray
combobox. So question is how may I select dot matrix printer option with vb
or vba?
 
F

Feng

Hi,

Actually, I wasn't trying to get a list of printers available. But rather I was trying to figure how to select the different laser trays for mail merging labels. In createnewdocument, there is an option for lasertray. In my word document the tray options are "Default Tray", "Automatically Select", "1", "2", "3", "4", "5", "6". Whereas in VB, the options are wdPrinterAutomaticSheetFeed
wdPrinterDefaultBin
wdPrinterEnvelopeFeed
wdPrinterFormSource
wdPrinterLargeCapacityBin
wdPrinterLargeFormatBin
wdPrinterLowerBin
wdPrinterManualEnvelopeFeed
wdPrinterManualFeed
wdPrinterMiddleBin
wdPrinterOnlyBin
wdPrinterPaperCassette
wdPrinterSmallFormatBin
wdPrinterTractorFeed
wdPrinterUpperBin

How do they equate? Or do they equate? And would I indicate that I want to use the dot matrix printer style?

Thanks
----- Doug Robbins - Word MVP wrote: -----

Hi Feng,

See the article "How can I get a list of the available printer names?" at:

http://www.mvps.org/word/FAQs/MacrosVBA/AvailablePrinters.htm

and other items in connection with printers at that site.

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
Feng said:
dot matrix printer and laser printer. If Laser printer is chosen, then it
asks you to chose the tray to print it out from. However in the
createnewdocument method or printout method of mailinglabel, the lasertray
property does not have a dot matrix printer option. Furthermore, the
constants do not match the options that I get from the labeloption box tray
combobox. So question is how may I select dot matrix printer option with vb
or vba?
 
D

Doug Robbins - Word MVP

Hi Feng,

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

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
Feng said:
Hi,

Actually, I wasn't trying to get a list of printers available. But rather
I was trying to figure how to select the different laser trays for mail
merging labels. In createnewdocument, there is an option for lasertray. In
my word document the tray options are "Default Tray", "Automatically
Select", "1", "2", "3", "4", "5", "6". Whereas in VB, the options are
wdPrinterAutomaticSheetFeed
wdPrinterDefaultBin
wdPrinterEnvelopeFeed
wdPrinterFormSource
wdPrinterLargeCapacityBin
wdPrinterLargeFormatBin
wdPrinterLowerBin
wdPrinterManualEnvelopeFeed
wdPrinterManualFeed
wdPrinterMiddleBin
wdPrinterOnlyBin
wdPrinterPaperCassette
wdPrinterSmallFormatBin
wdPrinterTractorFeed
wdPrinterUpperBin

How do they equate? Or do they equate? And would I indicate that I want
to use the dot matrix printer style?
 

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