Each of our departments have a different label printer, but they are all set
up on lpt3. We have a label macro that is used by these departments and we
would like to have that macro automatically print to lpt3. Is there a way to
set the activeprinter to the lpt3 port without using the printer name?

RE: Print to selected port, instead of selected printer? by ryguy7272

ryguy7272
Tue Apr 01 11:54:03 PDT 2008

I use this:
Application.Dialogs(xlDialogPrinterSetup).Show

I don't like printing to a specific printer because if any printer goes
down, you don't have to fiddle around with code to select different
destination printers. Anyway, I think it is easier for end users.

Regards,
Ryan---

--
RyGuy


"GrannyM" wrote:

> Each of our departments have a different label printer, but they are all set
> up on lpt3. We have a label macro that is used by these departments and we
> would like to have that macro automatically print to lpt3. Is there a way to
> set the activeprinter to the lpt3 port without using the printer name?

RE: Print to selected port, instead of selected printer? by GrannyM

GrannyM
Tue Apr 01 12:12:03 PDT 2008

Thanks, but they do not want me to show a dialog box. To quote: "if they
only have 1 label printer and it's always mapped to lpt3, why should they
have to choose it, just automatically print the label to lpt3."

"ryguy7272" wrote:

> I use this:
> Application.Dialogs(xlDialogPrinterSetup).Show
>
> I don't like printing to a specific printer because if any printer goes
> down, you don't have to fiddle around with code to select different
> destination printers. Anyway, I think it is easier for end users.
>
> Regards,
> Ryan---
>
> --
> RyGuy
>
>
> "GrannyM" wrote:
>
> > Each of our departments have a different label printer, but they are all set
> > up on lpt3. We have a label macro that is used by these departments and we
> > would like to have that macro automatically print to lpt3. Is there a way to
> > set the activeprinter to the lpt3 port without using the printer name?

Re: Print to selected port, instead of selected printer? by Doug

Doug
Tue Apr 01 12:53:42 PDT 2008

Rename all of the label printers as "LabelPrinter" and then have the code
select that printer name.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"GrannyM" <GrannyM@discussions.microsoft.com> wrote in message
news:C966DEE9-D3F3-411C-A74A-72058F1F4229@microsoft.com...
> Each of our departments have a different label printer, but they are all
> set
> up on lpt3. We have a label macro that is used by these departments and
> we
> would like to have that macro automatically print to lpt3. Is there a way
> to
> set the activeprinter to the lpt3 port without using the printer name?



Re: Print to selected port, instead of selected printer? by GrannyM

GrannyM
Tue Apr 01 13:09:03 PDT 2008

That's what my solution was, or at least have "Label Printer - printer name"
so that I could pull it using Instr(), but my tech support person keeps
telling me there has to be some way of selecting LPT3.

Thanks anyway

"Doug Robbins - Word MVP" wrote:

> Rename all of the label printers as "LabelPrinter" and then have the code
> select that printer name.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "GrannyM" <GrannyM@discussions.microsoft.com> wrote in message
> news:C966DEE9-D3F3-411C-A74A-72058F1F4229@microsoft.com...
> > Each of our departments have a different label printer, but they are all
> > set
> > up on lpt3. We have a label macro that is used by these departments and
> > we
> > would like to have that macro automatically print to lpt3. Is there a way
> > to
> > set the activeprinter to the lpt3 port without using the printer name?
>
>
>

RE: Print to selected port, instead of selected printer? by JeanGuyMarcil

JeanGuyMarcil
Tue Apr 01 13:12:03 PDT 2008

"GrannyM" wrote:

> Each of our departments have a different label printer, but they are all set
> up on lpt3. We have a label macro that is used by these departments and we
> would like to have that macro automatically print to lpt3. Is there a way to
> set the activeprinter to the lpt3 port without using the printer name?

Basically, you need to scan the list of available printers detected by Word
on the user machine. Then, scan the ports in that list to get the printer
name associated with the targeted port. Store the currently active printer.
Set the active printer to the one the code detected as being active on the
targeted port. Print. Then reset the printer that was active before your code
ran.

See
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=183
for code on getting printer information, including the port name...

RE: Print to selected port, instead of selected printer? by JeanGuyMarcil

JeanGuyMarcil
Tue Apr 01 13:13:00 PDT 2008

"ryguy7272" wrote:

> I use this:
> Application.Dialogs(xlDialogPrinterSetup).Show

That is Excel VBA...

This is a Word group.


RE: Print to selected port, instead of selected printer? by GrannyM

GrannyM
Tue Apr 01 13:33:02 PDT 2008

That's what I needed, although I will have to say that Doug's solution of
looking for a printer with "label" in the name is much simplier. But if they
insist that I print to LPT3, now I can do so. (Of course, this means I have
to tell him he was right all along!) ;-)

Thanks!

"Jean-Guy Marcil" wrote:

> "GrannyM" wrote:
>
> > Each of our departments have a different label printer, but they are all set
> > up on lpt3. We have a label macro that is used by these departments and we
> > would like to have that macro automatically print to lpt3. Is there a way to
> > set the activeprinter to the lpt3 port without using the printer name?
>
> Basically, you need to scan the list of available printers detected by Word
> on the user machine. Then, scan the ports in that list to get the printer
> name associated with the targeted port. Store the currently active printer.
> Set the active printer to the one the code detected as being active on the
> targeted port. Print. Then reset the printer that was active before your code
> ran.
>
> See
> http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=183
> for code on getting printer information, including the port name...