- This topic has 1 Antwort, 1 Stimme, and was last updated 10:55 um 7. Februar 2011 by Unbekannt.
1 Antwort anzeigen (von insgesamt 1)
1 Antwort anzeigen (von insgesamt 1)
Home-›Foren-›Outlook-›Outlook VBA-›Mail über Regel mit Script automatisch speichern
Hi,
in den Regeln wird es nur angezeigt, wenn du dem Sub ein Argument des Typs Outlook.MailItem mitgibst.
Ich hab das mal umgeschrieben, da es nicht der einzige Fehler war 😉
Public Sub SaveAsTXT(myItem As Outlook.MailItem)
strname = myItem.Subject
strname = Replace(strname, \”/\”, \” \”)
strname = Replace(strname, \”\\\”, \” \”)
strname = Replace(strname, \”:\”, \” \”)
strname = Replace(strname, \”?\”, \” \”)
strname = Replace(strname, Chr(34), \” \”)
strname = Replace(strname, \”<\", \" \")
strname = Replace(strname, \">\”, \” \”)
strname = Replace(strname, \”|\”, \” \”)
\’Prompt the user for confirmation
Dim strPrompt As String
strPrompt = \”Are you sure you want to save the item? If a file with the same name already exists, it will be overwritten with this copy of the file.\”
If MsgBox(strPrompt, vbYesNo) = vbYes Then
myItem.SaveAs \”C:\\Technik\” & strname & \”.msg\”, Outlook.OlSaveAsType.olMSG
Else
MsgBox \”There is no current active inspector.\”
End If
End Sub
Gruß
Abonnieren Sie den 14-tägig erscheinenden Newsletter von Mailhilfe.de kostenlos.
Der ständig aktuelle Tipps zu Thema Email für Sie bereithält!
Wie z.B. Outlook, GMail, Thunderbird oder auch KuNoMail, usw.
Ihre E-Mail Adresse: