Hallo A.,
klar gibts sowas. Hier wird im persoenlichen Ordner "Dokumente" gespeichert, unabhaengig vom Benutzerkonmto. Also Pfad anpassen, wenn benoetigt. Format fuer die Speicherung so wie von dir angegeben: YYYY-MM-DD hh.mm Betreff.msg
Einfach den Code in "ThisOutlookSession" kopieren. Email selektieren und code ausfuehren.
Gruss Torsten
Sub SaveEmail()
Dim strPath As String
Dim strText As String
strPath = Environ("USERPROFILE") & "\Documents\"
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, "YYYY-MM-DD hh.mm") & " " & strText & ".msg", olMSG
End With
End Sub
|