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
print only the first page of the selected email using a macro
Franco Levati
0
Reputation points
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
2 answers
Sort by: Most helpful
-
Franco Levati 0 Reputation points
2024-07-15T13:08:13.5833333+00:00 -
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