Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print bulk emails but just the first page
#1
I am trying to create a Macros to print bulk emails but when printing it should only print the first page of all the emails. I have managed to find something similar however the problem that I am having is that it prints the entire document instead of just printing the first page of the email. Please if someone could help me with this that would be highly appreciated. UNDERLINED PART IS WHERE i AM HAVING THE PROBLEM, WHEN I ADD THE LAST PART TO PRINT JUST THE FIRST PAGE, THE MACROS DOESN'T WORK AT ALL. Please help.

This is the code I found
----------------------------

Sub Printemailswithattachments()

Dim objOL As Outlook.Application
Dim objMsg As Outlook.MailItem
Dim objAttachments As Outlook.Attachments
Dim objSelection As Outlook.Selection
Dim i As Long
Dim lngCount As Long
Dim Response As Integer
Dim msg As String
Dim strSubject As String

On Error Resume Next

Set objOL = CreateObject("Outlook.Application")
Set objSelection = objOL.ActiveExplorer.Selection
For i = objSelection.Count To 1 Step -1
objSelection(i).PrintOut Range:=wdPrintRangeOfPages, Pages:="1" '
Next



ExitSub:
Set objAttachments = Nothing
Set objMsg = Nothing
Set objSelection = Nothing
Set objOL = Nothing
End Sub


Forum Jump:


Users browsing this thread: 1 Guest(s)