How to Auto Use a Specific Printer to Print Outlook Emails

You can’t configure Outlook to use a specific non-default printer to print emails. But in this article, we will show you a method to achieve it with Outlook VBA.

Your computer must have set a printer as the default one, which will be applied to all programs on this computer. In this case, if you want to print emails through a non-default printer in Outlook, you have to change the printer every time when printing. It is quite troublesome. Therefore, in the followings, we will share you a means to auto use a specific printer for emails without needs to changing printer each time.

Auto Use a Specific Printer to Print Outlook Emails

Auto Use a Specific Printer to Print Emails

  1. At the very outset, start your Outlook application.
  2. Then, in the main Outlook window, press “Alt + F11” key buttons.
  3. Next, in the displaying “Microsoft Visual Basic for Applications” window, you need to firstly enable “Microsoft Word object Library”. You can click ‘Tools” > “Reference” to achieve it.
  4. Then, you need to access an empty module.
  5. Subsequently, copy and paste the following VBA code into this module.
Sub PrintEmail()
    Dim objItem As Object
    Dim objMail As Outlook.MailItem
    Dim objWordApp As Word.Application
    Dim strTempFolder As String
    Dim strMailDocument As String
    Dim objMailDocument As Word.Document
    Dim strPrinter As String

    Select Case Application.ActiveWindow.Class
           Case olInspector
                Set objItem = ActiveInspector.CurrentItem
           Case olExplorer
                Set objItem = ActiveExplorer.Selection.Item(1)
    End Select
 
    If TypeOf objItem Is MailItem Then
       Set objMail = objItem
 
       Set objWordApp = CreateObject("Word.Application")
       strTempFolder = CStr(Environ("USERPROFILE")) & "\AppData\Local\Temp"
       strMailDocument = strTempFolder & "\" & Format(Now, "yyyymmddssnn") & ".doc"
       objMail.SaveAs strMailDocument, olDoc
 
       Set objMailDocument = objWordApp.Documents.Open(strMailDocument)
       objWordApp.Visible = True
       objMailDocument.Activate
 
       strPrinter = objWordApp.ActivePrinter
       'Change to the name of specific printer
       objWordApp.ActivePrinter = "Specific Printer"
       objWordApp.PrintOut Range:=wdPrintAllDocument, Item:=wdPrintDocumentContent
       objWordApp.ActivePrinter = strPrinter
 
       objMailDocument.Close False
       objWordApp.Quit
       Kill strMailDocument
    End If
End Sub

VBA Code - Auto Use a Specific Printer to Print Outlook Emails

  1. After that, you can close the current window.
  2. Then, go to “File” menu and click “Options”.
  3. In the “Outlook Options” window, shift to “Quick Access Toolbar” tab and add the new macro to Quick Access Toolbar as usual.
  4. Eventually, you can try this VBA project.
  • Firstly, select or open an email which you want to print.
  • Then, click on the macro button in Quick Access Toolbar.
  • The email will be printed out by the specific printer at once.
  1. From now on, to print emails by specific printer, you can just use this macro.

Recover Outlook after Accident Corruption

So as to block your Outlook data from being lost, you have to make great efforts. For instance, you should back up your PST file on a regular basis. Of course, it is suggested to get hold of an external repair tool, like DataNumen Outlook Repair. It can fix PST errors and restore maximum Outlook data for you.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover sql and outlook repair software products. For more information visit www.datanumen.com