+ Reply to Thread
Results 1 to 3 of 3

Thread: Macro for printing

  1. #1
    Registered User
    Join Date
    05-26-2010
    Location
    Mississauga, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    3

    Macro for printing

    I'm trying to record a macro that will automatically make a pdf so that I won't have to go to the print menu manually everytime. The pdf maker that I have is not my default printing option, but when I make the macro and assign it to a button it works fine because it takes me to the printer menu and lets me choose the printer and what to name it. But when I close the program and re-open it, then when I click on the button it just automatically uses the default printer and ends up printing, instead of letting me choose the pdf maker.

    Does anyone know how I can get the macro to stop at the printer menu?

  2. #2
    Forum Contributor
    Join Date
    08-02-2007
    Location
    Panama & Austria
    MS-Off Ver
    XP 2003
    Posts
    182

    Re: Macro for printing

    Hi Stretch90
    Use the code:
    ActiveWorkbook.PrintOut Copies:=1, ActivePrinter:="CutePdf at Xlf:"


    if not sure the right name of the printer/pdf maker, then set it as default and then run this code
    Debug.print Application.ActivePrinter

  3. #3
    Forum Guru Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007
    Posts
    3,523

    Re: Macro for printing

    This code will open the printer dialog and allow you to select the printer of choice.

    Sub Show_Printer_Dialog()
    
        Application.Dialogs(xlDialogPrint).Show
    
    End Sub
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0