Hello everyone
I need some help with the script below, it's working great but i would like to add a additional function to it.
I work with this script within outlook (rules).
When i receive a email from a certain supplier (invoices) it's now been saved to a certain folder, so far so good!
However i also would like that the script automatically prints the attachment (.pdf) that comes with the email.
I am not known with vba scripts....
Can somebody help me with this??
Thanks in advance
Alfred
Public Sub saveAttachtoDisk(itm As Outlook.MailItem) Dim objAtt As Outlook.Attachment Dim saveFolder As String saveFolder = "C:\data\Docs" For Each objAtt In itm.Attachments If InStr(objAtt.DisplayName, ".pdf") Then objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName End If Set objAtt = Nothing Next End Sub






Reply With Quote
