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
Sub PDFDrucken()
Dim MyAnhang As Attachment
Dim MyMail As MailItem
Dim file_name, tmp_dir As String
Set Selection = Outlook.ActiveExplorer.Selection
tmp_dir = "c:\
winnt\temp"
For Each MyMail In Selection
If MyMail.Attachments.Count > 0 Then
Set MyAnhang = MyMail.Attachments(1)
file_name = tmp_dir & "\" & MyAnhang.FileName
MyAnhang.SaveAsFile (file_name)
ShellExecute 0, "print", file_name, vbNullString, vbNullString, 0
End If
Next
End Sub