print only the first page of the selected email using a macro

Franco Levati 0 Reputation points
2024-05-08T09:08:27.84+00:00

With outlook

The emails I receive are very long and when I print I throw away a lot of paper, I only need the first page.

I would like to do this with a macro that chooses the printer and only defines the first page

Thanks

Franco

Outlook
Outlook
A family of Microsoft email and calendar products.
3,376 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,698 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Franco Levati 0 Reputation points
    2024-07-15T13:08:13.5833333+00:00

    Sub PrintFirstPage() Dim objMail As Outlook.MailItem Set objMail = Application.ActiveExplorer.Selection.Item(1) objMail.Display SendKeys "%f", True SendKeys "%p", True SendKeys "%r", True SendKeys "%s", True SendKeys "1", True SendKeys “ENTER”, True End Sub

    0 comments No comments

  2. Franco Levati 0 Reputation points
    2024-07-15T15:05:19.7833333+00:00

    I have tried a similar approach and can print from the macro but cannot impose the number of pages

    Even if I put 1, it prints the whole email

    Sub PrintFirstPage2()
    
    'Dim objMail As Outlook.MailItem
    
    'Set objMail = Application.ActiveExplorer.Selection.Item(1)
    
    'objMail.Display
    
    SendKeys "%fpr", True
    
    SendKeys "%s", True
    
    SendKeys "1", True
    
    SendKeys "{ENTER}", True
    
    End Sub
    
    0 comments No comments