Good Afternoon Michael,
I get a lot of attachments in PDF, DOC, XLS and JPG formats. I have the
software required to print each format. So I have attempted to use this
script but it is not working for me. I entered the script, then made a rule
that filtered it down to specific mailboxes (not my primary mailbox).
I don't believe I have edited it at all but here it is:
Private Sub PrintAttachments(oMail As Outlook.MailItem)
On Error Resume Next
Dim colAtts As Outlook.Attachments
Dim oAtt As Outlook.Attachment
Dim sFile As String
Dim sDirectory As String
Dim sFileType As String
sDirectory = "D:\Attachments\"
Set colAtts = oMail.Attachments
If colAtts.Count Then
For Each oAtt In colAtts
sFileType = LCase$(Right$(oAtt.FileName, 4))
Select Case sFileType
Case ".xls", ".doc"
sFile = ATTACHMENT_DIRECTORY & oAtt.FileName
oAtt.SaveAsFile sFile
ShellExecute 0, "print", sFile, vbNullString, vbNullString, 0
End Select
Next
End If
End Sub
Is there something else I need to do or am I missing something??
Thanks in Advance!!
Rich Webb