Re: Printing an Attachment Automatically??
From: Ken Slovak - [MVP - Outlook] (kenslovak_at_mvps.org)
Date: 12/03/04
- Next message: Michael Bauer: "Re: Export of mail headers"
- Previous message: Ken Slovak - [MVP - Outlook]: "Re: Accessing "Propose new time" Feature in Outlook"
- In reply to: saul kaye: "Re: Printing an Attachment Automatically??"
- Next in thread: Yonah Sudwerts: "Re: Printing an Attachment Automatically??"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 3 Dec 2004 11:04:57 -0500
The code you posted with your attachment extraction loop looks OK. I would
just add in the loop this:
For i = lngCount To 1 Step -1
strFile = strFolder & objAttachments.Item(i).FileName
objAttachments.Item(i).SaveAsFile strFile
ShellExecute 0&, "print", strFile, 0&, 0&, 0&
Next i
The declaration for ShellExecute should be at the module level, above and
subs or functions in that code or class module as follows:
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'Then this:
Sub Save_Attachments_TESTER_Folder()
'and so on
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "saul kaye" <pharm_x@netvision.net.il> wrote in message news:41af3931$0$15741$9a6e19ea@unlimited.newshosting.com... > Thanks Ken, Can you please try and look at the post before this one, as it > was my most recent one. I am sorry for driving you crazy. > Yoni
- Next message: Michael Bauer: "Re: Export of mail headers"
- Previous message: Ken Slovak - [MVP - Outlook]: "Re: Accessing "Propose new time" Feature in Outlook"
- In reply to: saul kaye: "Re: Printing an Attachment Automatically??"
- Next in thread: Yonah Sudwerts: "Re: Printing an Attachment Automatically??"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|