Noch nie was mit VBA gemacht?
Hier nochmal der gesamte Code mit Pfadbeispiel von mir:
Sub SaveEmail()
Dim strPath As String
Dim strText As String
Dim obj As Object
strPath = "C:\Users\Documents\Outlook Files\"
If TypeOf Application.ActiveWindow Is Outlook.Explorer Then
Set obj = Application.ActiveWindow
Set obj = obj.Selection(1)
Else
Set objInspector = ActiveInspector
objInspector.Activate
If objInspector.IsWordMail Then
Set obj = Application.ActiveInspector.CurrentItem
End If
End If
With obj
strText = Replace(.Subject, "/", "_")
strText = Replace(strText, "!", "")
strText = Replace(strText, ".", "_")
strText = Replace(strText, "\", "_")
strText = Replace(strText, ":", "_")
strText = Replace(strText, "(", "")
strText = Replace(strText, ")", "")
strText = Replace(strText, """", "")
.SaveAs strPath & Format(.ReceivedTime, "dd-mm-yyyy_hh.mm") & "_" & strText & ".msg", olMSG
End With
End Sub
Gruss
|