Print first page of a new email

Status
Not open for further replies.

Arno

New Member
Outlook version
Outlook 2007
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
 

Arno

New Member
Outlook version
Outlook 2007
Email Account
Exchange Server
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.
 

Arno

New Member
Outlook version
Outlook 2007
Email Account
Exchange Server
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?
 

Arno

New Member
Outlook version
Outlook 2007
Email Account
Exchange Server
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.
Thread starter Similar threads 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
C print more than one month per page in outlook 2010 calendar Using Outlook 5
A print contacts memo style without page breaks Using Outlook 1
S Outlook Printing - How to Just Print Current or Selected Page Using Outlook 1
Q How to print multiple (2) weeks on one page? Calendar Printing Assistant 3
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 Calendar Printing Assistant 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 New Slipstick.com Articles 0
Diane Poremsky Combine and Print Multiple Outlook Calendars New Slipstick.com Articles 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 New Slipstick.com Articles 0
Diane Poremsky No drop down calendars in Outlook 2010 Print Options New Slipstick.com Articles 0
Diane Poremsky Print Monthly or Work Week Calendars New Slipstick.com Articles 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 Calendar Printing Assistant 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
J calendar print setup in outlook 2010 Calendar Printing Assistant 1
J Outlook 2010 using Quick Print to print attachments Using Outlook 1
D Use Outlook 2003 embedded imaged cannot print from the mail preview list Using Outlook 4
J Print next 7 days view of calendar (2010) Using Outlook 3
C Print all emails in a single folder with sent items Using Outlook 2
P Outlook closes down after clicking on the quick print icon. Using Outlook 3
I Outlook 2010 Print Created Date on Drafts Using Outlook 3
Similar threads


















































Top