Results 1 to 4 of 4
  1. #1
    harrisc
    Guest

    Word 97 Accessing printers

    Hi,

    I have writtent a VBA macro to print labels. I want to access a label printer. Currently I have hard coded in the printer name. How can I call up all available printers, so that the user can select the corret printer.

    Thanks

    Chris Harris

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Word 97 Accessing printers

    The following lines of code should work :-

    Application.Dialogs(xlDialogPrinterSetup).Show for Excel

    Application.Dialogs(wdDialogFilePrintSetup).Show for Word



    Regards,

    Andrew C

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 97 Accessing printers

    If you just can't help yourself and want to get fancy, you can enumerate all the printers installed on the client then populate a combobox with the names, then set the active printer to the name selected. Probably too much work, but if you have nothing better to do for the afternoon, why not?

    You'll need <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q166/0/08.asp>Q166008</A>.

    Have fun.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  4. #4
    harrisc
    Guest

    Re: Word 97 Accessing printers

    Thanks to those you replied. From the information supplied, I also found some more information at http://www.mvps.org/word/FAQs/MacrosVBA/Av...blePrinters.htm This code work with no changes.

    All code seemed to use the same API and based on what Microsoft provides in a knowledge base.

    Regards

    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •