Results 1 to 2 of 2

Thread: active printer selection in macro

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    1

    active printer selection in macro

    i installed a new usb-printer with 2 trays. to avoid switching the settings for the printer i installed the same printer 2 times on the same dot_04 usb port and gave each printer his own settings. so the first name is 1320blanco and he has the settings to take blanco paper from tray2. the 2th printer has the name 1320logo and this printer takes paper with company logo from tray3. both printers are shared so i can use them over the network on other computers. in my macro's i've to make a difference in printing and sometimes we have to print on blanco paper (stock manipulation) and other times (for invoicing) we have to print on logo paper. when i record a stupid macro in excel on the computer where the printer is connected and simply choosing printer 1320blanco i have following result. "Application.ActivePrinter= "1320blanco on Ne04:" When i record the same macro on the other computer and i choose the same printer 1320blanco i've the following result. "Application.ActivePrinter= "1320blanco on Ne07:" . i can't understand why there is a difference in used ports and i can't program the macro because i receive a visual basic error when the macro is running on the other computer. the solution to me is to program the printer by name and not by port. who can help me to realise the macro
    some people told me to make a user input at the moment i've to print and to ask for a selection in printer but our secretarry is not happy with this solution

  2. #2
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536

    Re: active printer selection in macro

    I'm not sure I really understand what you need to do, but does this link help?

    http://word.mvps.org/FAQs/MacrosVBA/...lePrinters.htm


    Alternatively, you could show the printer dialogs

    Prt = Application.Dialogs(wdDialogFilePrint).Show

    OR

    Prt = Application.Dialogs(wdDialogFilePrintSetup).Show
    This world is not my home. I'm just passing through.

Posting Permissions

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



Click Here to Expand Forum to Full Width