Print just the first page in Outlook [VIDEO]

Save paper and time

If I print emails I typically only want the first page. To do that in Outlook takes a few clicks each time.

To make printing just the first page easier I created a macro. You can’t record macros in Outlook, so I used the SendKeys commands, which mimics key strokes.

ADDED 9 April 2022 – seems a recent update to OUTLOOK has stopped this macro from working. I am am investigating.

ADDED 10 April 2022 – big thanks to Jan Karel Pieterse an Excel MVP who made some great suggestions to get around this new issue. The code is a bit longer as it uses multiple Tab key presses to access different options. He also provided a new GetKeyState code for the top.

The macro works for me – no guarantees it will work for you, but fingers crossed. The new solution avoids using the Alt key which isn’t recognised in the latest Outlook version.

The macro works whether you have an email selected in the email list, or whether it is the current, open email. It will open the email if it is selected in the email list.

Please let me know how you go.

Option Explicit
#If VBA7 Then
    Private Declare PtrSafe Function GetKeyState Lib "USER32" (ByVal vKey As Long) As Integer
#Else
    Private Declare Function GetKeyState Lib "USER32" (ByVal vKey As Long) As Integer
#End If
 
Sub New_Print_One_Page()
 
SendKeys "{ENTER}"
SendKeys "^p"
SendKeys "{TAB 11}"
SendKeys "{ENTER}"
SendKeys "{TAB 3}"
SendKeys "1"
SendKeys "{ENTER}"
 
If GetKeyState(vbKeyNumlock) = 0 Then
SendKeys "{NUMLOCK}", True
End If
 
End Sub

ADDED 13 April 2022 – yet another solution from someone in the comments.  See which one works for you.

This macro doesn’t open the email if printing from the list.

Option Explicit
#If VBA7 Then
Private Declare PtrSafe Function GetKeyState Lib "USER32" (ByVal vKey As Long) As Integer
#Else
Private Declare Function GetKeyState Lib "USER32" (ByVal vKey As Long) As Integer
#End If
 
Sub New_Print_One_Page()
 
SendKeys "^p"
SendKeys "%FPR"
SendKeys "%S"
SendKeys "1"
SendKeys "{ENTER}"
 
If GetKeyState(vbKeyNumlock) = 0 Then
SendKeys "{NUMLOCK}", True
End If
 
End Sub

Added 6 March 2020 – The latest code I use, which handles the Number Lock issue, is below. This may be affected by 32 bit vs 64 bit versions.

Added 9 April – as at this date the code below might not work in the latest subscription version of Outlook. The solution is above.

Option Explicit
#If VBA7 Then
    Private Declare PtrSafe Function GetKeyState Lib "USER32" (ByVal vKey As Long) As Integer
#Else
    Private Declare Function GetKeyState Lib "USER32" (ByVal vKey As Long) As Integer
#End If
 
Sub Print_One_Page()
 
SendKeys "%FPR"
SendKeys "%S"
SendKeys "1"
SendKeys "{ENTER}"
 
If GetKeyState(vbKeyNumlock) = 0 Then
SendKeys "{NUMLOCK}", True
End If
 
End Sub

Outlook macros are a bit different to set up than Excel, so I have done a video to show you the steps. The macro is below with the steps to install underneath.

Warning: Once you install the macro Outlook will ask you to enable macros each time it opens.

Second Warning: This technique may affect your Num Lock setting – it does mine, but I still use it.

This macro works for Outlook 2010. Old code.

Sub Print_One_Page()
 
 SendKeys "%FPR" 
 SendKeys "%S"
 SendKeys "1"
 SendKeys "{ENTER}"
 
End Sub

Installation steps

  1. Copy the code above
  2. In Outlook press Alt + F11 to open the VBA window
  3. Double click the ThisOutlookSession on the left of screen
  4. Copy the code from above and paste into the code window on the right of the VBA screen – see image below.Outlool VBA with macro
  5. Close the VBA Window
  6. Click the File tab, click Options, then click Quick Access Toolbar option on the left
  7. In the drop down select Macros
  8. Select the Print_One_Page macro and click the Add button – see image below.Macro selection
  9. On the right of screen select the macro at the bottom of the list and click Modify – see image below.Select icon for macro
  10. Select an icon and click the OK button and click OK to finish
  11. When you close Outlook after installing the macro it will ask you whether to save the changes – make sure you save them.

Clicking the icon (yellow smiley face) will print just the first page of the selected or current email.

Added 2nd May 2013 – the image below shows my macro security settings in Outlook 2013. (File Tab > Options > Trust Center > Trust Center Settings button)

outlook security settings


Please note: I reserve the right to delete comments that are offensive or off-topic.

Leave a Reply to neale_blackwood Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

60 thoughts on “Print just the first page in Outlook [VIDEO]

  1. Thanks for this. However this macro worked fine until I closed Outlook. Then it didn’t work again. Stepping into the macro it said “macros for this project are disabled”. The settings in the trust centre are still the same. How is this fixable.

    • In the Trust Center you need to have the Macro setting set to Notifications for all macros – then when you start Outlook a dialog is displayed asking you to enable macros.

      • Thanks for your response! I had it on this setting already but it didn’t seem to make any difference. I self-certified the macro for a digital sig and then for some reason it started working. When I tried running the macro is wanted me to trust the publisher, which I did and then it seemed to work again. Peculiar! Anyway, very good macro!

        • I just added a Second Warning – this technique can affect the Num Lock status. Apparently its a bug with using Send Keys.

          • Yes, I just came back to ask about the Num Lock status issue. It’s worth putting up with, butI have seen some macro solutions involving GetKeyboardState command. Haven’t got it to work yet!

  2. I had to set my macros in Outlook 2013 in the trust center to allow all macros before this would work. I don’t think this is very secure for my computer. What should I do?

  3. First, thanks so much for the macro, it has saved heaps of paper and time!
    Can the macro be expanded to select a particular printer first? I have installed and named several versions of my printer, each with preferences set for a particular purpose e.g. FX C7775 black duplex stapled hole punch
    I can change the default printer but unfortunately our work setup is such that at each login the default printer is set to colour, which is the most convenient for most printing jobs in our office.
    Thnx
    Liz

      • I suspected so but think I have a half solution. I’ve created a macro and button for word to print from the colour printer, and added a Devices and Printers shortcut to my startup folder, hopefully it will remind me to change my default printer to the black one.

    • You could change the printer using the SendKeys function
      %n will get you to the printer name drop down list, then you can send keys to get to the printer you want.

    • I have been using a slightly different version in Excel 2013.

      Sub Print_One_Page()

      ‘ SendKeys “%FPR”
      ‘ SendKeys “%S”
      ‘ SendKeys “1”
      ‘ SendKeys “{ENTER}”

      CreateObject(“WScript.Shell”).SendKeys “%FPR”
      CreateObject(“WScript.Shell”).SendKeys “%S”
      CreateObject(“WScript.Shell”).SendKeys “1”
      CreateObject(“WScript.Shell”).SendKeys “{ENTER}”

      If GetKeyState(VK_NUMLOCK) <> 1 Then CreateObject(“WScript.Shell”).SendKeys “{NUMLOCK}”, True

      End Sub

      • Sorry all the code for the latest version is shown below.

        Option Explicit

        Public Const VK_NUMLOCK = &H90

        Public Declare Function GetKeyState Lib “user32” (ByVal nVirtKey As Long) As Long
        Sub Print_One_Page()

        ‘ SendKeys “%FPR”
        ‘ SendKeys “%S”
        ‘ SendKeys “1”
        ‘ SendKeys “{ENTER}”

        CreateObject(“WScript.Shell”).SendKeys “%FPR”
        CreateObject(“WScript.Shell”).SendKeys “%S”
        CreateObject(“WScript.Shell”).SendKeys “1”
        CreateObject(“WScript.Shell”).SendKeys “{ENTER}”

        If GetKeyState(VK_NUMLOCK) <> 1 Then CreateObject(“WScript.Shell”).SendKeys “{NUMLOCK}”, True

        End Sub

  4. Thought I had found the answer I’d been looking for……
    but when I use the macro, it doesn’t print, but instead it displays on screen all the hidden ‘notes’ and reminders from a program I use called TurboNote – how can I stop that happening?

  5. Hello
    I get emails from Paypal that have service@intl.paypal.com in the from field
    The properties of the email however have a reply to email address embedded such as billsmith@yahoo.com so that when i select the email and hit reply it sends an email to billsmith and not paypal.
    It there a way to have a macro that i can run that would do this and insert a template.
    Outlook 2010
    Windows 10
    By the way, if i highlight the email and select reply it will reply to Paypal the email has to be opened first and then select reply so the reply-to email address is selected.

    Regards

    • Hi Wil
      Sorry my expertise is in Excel – the Outlook macro I shared was a solution I use to save paper and time. I thought others may find it helpful.
      I think an Outlook macro could do what you want but my skill level is not up to it.
      Maybe check out an Outlook VBA forum.
      Regards
      Neale

  6. The block num solution does not work with 64bit.

    Did you have a 64 bit solution?

    By the way great macro. Very nice!

    • See if this line of code works – I can’t test as I have 32 bit.

      Declare Function GetKeyState Lib “user32” Alias “[COLOR=#ff0000]#1866[/COLOR]” (ByVal nVirtKey As Long) As Integer

  7. I hope this tread is still active.
    I am looking for this Print_one_page VBA-code suitable for Outlook Office 365 (cloud) for ages! Unfortunately non of the above mentioned options work . Maybe the codes used are too old?
    It sometimes opens an e-mail only, but no printing a all (even not an error message).
    Any idea how to solve this?
    Thank you

  8. Hey man, thank you so much for this but I have been using it for some time now and since today, all it does is pop out the email as if I double clicked it. It seems that is the motion that it is mimicking now. I don’t known if Outlook made a new update but it seems this is what is happening with this Macros.
    Is there a new macros code I can use pleaseeee? This is really important and I don’t want to go back to the stone ages on this one page printing.

  9. Tried the new solution but nothing happens when I select the macro, no window pop up or anything.

    any suggestions?

    • Hi Neale, the new one works now. Thank you so much. Although I was having issues when I had not removed the older macros I had on but I guess that has been sorted.
      Thank you again

        • Hi again, I am trying to get this set up on other work computers which are still on Windows 10 while mine (which works) is on Windows 11 Pro. I think the function isn’t working on the others because it only pops out the “print page” page and that’s all. I am theorizing that this is new macros is for a windows 11 updated computer then? or could there be some other reason like the old macros still getting confused with the new one? Please help.

  10. The code prints for me but does not limit to just page 1. Thank you for putting this out there. It was so helpful before.

    • That happened to me while I was tweaking it. I will do a video showing how I got this second version to work – its called trial and error. It might help you tweak yours – it might only take one more or less tab to do it.

  11. Thanks for this posting. I had same problem for printing the first page. So I tried to follow your code, but it is working only one time when Outlook is started. And I found that below amended code is worked well now. I hope it is usefull to somebody. Once again, thanks for your great posting!

    Sub New_Print_One_Page()

    SendKeys “^p”
    SendKeys “%FPR”
    SendKeys “%S”
    SendKeys “1”
    SendKeys “{ENTER}”

    End Sub

  12. I tried lots of things
    And based on the code of someone else came up with the following which works

    Sub Print_One_Page()

    SendKeys “{ENTER}”
    SendKeys “^p”
    SendKeys “+({TAB})”
    SendKeys “{ENTER}”
    SendKeys “{TAB 3}”
    SendKeys “1”
    SendKeys “{ENTER}”
    SendKeys “{ESC}”
    End Sub

      • Hey Neale!

        I’m on Outlook 2019 & can’t find this to work . Thanks for the effort tho! When I use the highest script mentioned, It opens de print dialogue but doesn’t do the page 1 or Print action. Any ideas are more than welcome!

        • Hi Jesse
          For Office 2019 try the older versions of the code they were working until a recent update to Office 365 which you may not have.
          Also try the code at the bottom of the comments? There are a few more options there.
          Regards
          Neale