Kategorien

Outlook 2003 – Eingebette Bilder aus Mails exportieren

Um im Outlook 2003 in Mails eingebettete Bilder  alle in einem Schwung im JPG Format abzuspeichern bietet sich folgende Skript an das ich bei  auf planet-outlook.de gefunden habe. Das Original Skript der Website hab ich etwas umgebaut und angepasst. Der Export Ordner ist nun nicht mehr statisch sondern kann per Dialogbox individuell ausgewählt werden!

Hier das Skript:

Sub Eingebettete_Bilder_Speichern()

Dim objMail As Outlook.MailItem
Dim objAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment

Dim AppShell As Object
Dim BrowseDir As Variant

Set AppShell = CreateObject("Shell.Application")
Set BrowseDir = AppShell.BrowseForFolder(0, "Ordner auswählen", &H1000, 17)

On Error Resume Next

strImgPath = BrowseDir.Items().Item().Path & "\"
If Right(strImgPath, 1) <> "" Then
strImgPath = strImgPath & ""
End If

Set objMail = _
Application.ActiveInspector.CurrentItem
Set objAttachments = objMail.Attachments

For Each objAttachment In objAttachments
objAttachment.SaveAsFile _
strImgPath & _
objAttachment.FileName
Next

Set objAttachment = Nothing
Set objAttachments = Nothing
Set objMail = Nothing

End Sub

Leave a Reply