Print first page of a new email

Status
Not open for further replies.

Arno

New Member
Outlook version
Email Account
Exchange Server
I want to print the first page of every new email of a certain kind. I know how to make a rule to make the selection, but I'm completely blank what to put in the VBA script. Any ideas?

I got the selection working, with a rule which runs this script. But the printing part.... dunno....

Sub NewEmail(Item As MailItem)
MsgBox ("New email received: " & Item.Subject) 'just for testing.....

'but now.... print this email on the defaut printer, first page only... how?

End Sub
 
Code:
Item.GetInspector.Wordeditor.Printout Range:=wdPrintFromTo, From:="1", To:="1"

Thanks Michael, but I tried it, it doesn't work.

I found this at msdn:

PrintOut
Prints the Outlook item using all default settings.The PrintOut method is the only Outlook method that can be used for printing.

So I'm afraid it's not possible to print only the first page.
 
PrintOut is only if you use outlook's native print command. you can call up word (since its the editor for outlook).

But... like I said, it's not working. Nothing happens (but also no error message). How can I get this working?
 
Show the code, please.


Sub NewEmail(Item As MailItem)
MsgBox ("New email received: " & Item.Subject) 'just for testing.....
Item.GetInspector.Wordeditor.Printout Range:=wdPrintFromTo, From:="1", To:="1"
End Sub

Just the line I had... and the printout line. The message works (so the sub gets called when a new email arrives), but nothing is printed. Did I miss something?
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
B Code for Email Page/Print Page BCM (Business Contact Manager) 1
P Print multiple pocket calendars on one page Using Outlook 5
D Print Macro with Page Range? Using Outlook 9
G Print email attachments when hit subfolder Outlook VBA and Custom Forms 1
U Outlook not responding when trying to print Emails Using Outlook 6
D VBA Macro to Print and Save email to network location Outlook VBA and Custom Forms 1
S Cannot print Contacts Using Outlook 7
G print attachment straight away; working script edit not working Outlook VBA and Custom Forms 0
P Print attachments automatically and move the mail to an existing folder called "Ted" Outlook VBA and Custom Forms 4
S CONTACT FIELD PRINT ORDER Outlook VBA and Custom Forms 1
A VBA Script - Print Date between first email in Category X and last email in Category Y Outlook VBA and Custom Forms 3
B Outlook 2016 Outlook crashes when trying to print certain emails Using Outlook 5
M Batch print without appended trail of repeated e Using Outlook 2
Witzker print-list-of-outlook-folders with sort posibility Outlook VBA and Custom Forms 7
M Custom Calendar Print Suggestions? Using Outlook 0
M Print email and, attachments sent in hyperlinks in the email Outlook VBA and Custom Forms 2
D Print attachments automatically and moves the mail to a new folder Outlook VBA and Custom Forms 9
A Day view - print appointment details Using Outlook 1
I print calendar without subject and details Using Outlook 1
D Print Attachments only in selected emails using a macro Outlook VBA and Custom Forms 3
oliv- property "is printed" or catching print events Outlook VBA and Custom Forms 2
I Print Automatically Attachments Outlook VBA and Custom Forms 3
Diane Poremsky Print a list of your Outlook folders Using Outlook 0
Diane Poremsky Combine and Print Multiple Outlook Calendars Using Outlook 0
B Print list of previously sent recipients Using Outlook 1
R Print email message and attachment in order Outlook VBA and Custom Forms 2
L Outlook 2002: HTML Emails Will Not Print: Please Help Using Outlook 0
Diane Poremsky Print Monthly or Work Week Calendars Using Outlook 0
Diane Poremsky No drop down calendars in Outlook 2010 Print Options Using Outlook 0
Diane Poremsky Print Monthly or Work Week Calendars Using Outlook 0
S Macro to print & move selected emails? Using Outlook 3
J Auto print PDF attachments as they arrive with certain words in subject Outlook VBA and Custom Forms 3
H Problems With Outlook 2013 VBA To Send and Print an email Outlook VBA and Custom Forms 1
D Outlook 2013 Categories won't print In color Using Outlook 2
G Calendar monthly view - Print just 3 weeks Using Outlook 5
R Can't modify Outlook view font with IE anymore (even though IE still affects print font) Using Outlook 5
M Print Attachments from another mailbox (not default) Outlook VBA and Custom Forms 2
E Outlook VBA to print attached Pdf to a fax printer and assign fax number Using Outlook 0
L Outlook 2010 Quick Print Attachment, nothing happend Using Outlook 0
C automatically print attachments Using Outlook 4
J Automatically Print PDF When They Are Received Using Outlook 4
M button to send and print emails Using Outlook 26
S How to print ONLY first line of appointments in month view? Using Outlook 1
M print free/busy schedule of an user Using Outlook 2
O For Outlook 2007 - VBA to print attachments Using Outlook 1
W Cannot print Outlook 2007 emails Using Outlook 2
R problem with incomming e-mail I am unable to print full e-mail letter Using Outlook 1
M Custom print contacts Using Outlook 2
E Can't print from Outlook on wifi network Using Outlook 0
E can't print some retail discount coupons Using Outlook 7

Similar threads

Back
Top