Direkt zum Inhalt

Wie speichere ich Outlook-E-Mails automatisch auf Festplatte?

Für Backups, Arbeitsnachweise oder andere Zwecke möchten Sie möglicherweise Outlook-E-Mails auf der Festplatte speichern. Es ist einfach, mehrere E-Mails auf der Festplatte zu speichern, indem Sie manuell von Outlook auf die Festplatte ziehen. Wissen Sie jedoch, wie Sie jede eingehende E-Mail automatisch auf der Festplatte speichern können? In diesem Artikel wird ein VBA vorgestellt, der in Outlook damit umgehen kann.

Speichern Sie Outlook-E-Mails automatisch auf der Festplatte


Speichern Sie Outlook-E-Mails automatisch auf der Festplatte

Mit dieser Methode wird ein VBA eingeführt, mit dem jede eingehende E-Mail in Outlook automatisch als einzelne HTML-Datei auf der jeweiligen Festplatte gespeichert wird. Bitte gehen Sie wie folgt vor:

1. Drücken Sie Andere + F11 Tasten zum Öffnen des Fensters Microsoft Visual Basic für Applikationen.

2. Erweitern Sie das Projekt1 und doppelklicken Sie DieseOutlookSession Um es zu öffnen, fügen Sie den folgenden VBA-Code in das Fenster ThisOutlookSession ein. Siehe Screenshot:

VBA: Speichern Sie Outlook-E-Mails automatisch als HTML-Dateien auf der Festplatte

Private WithEvents InboxItems As Outlook.Items
Sub Application_Startup()
Dim xNameSpace As Outlook.NameSpace
Set xNameSpace = Outlook.Application.Session
Set InboxItems = xNameSpace.GetDefaultFolder(olFolderInbox).Items
End Sub

Private Sub InboxItems_ItemAdd(ByVal objItem As Object)
Dim FSO
Dim xMailItem As Outlook.MailItem
Dim xFilePath As String
Dim xRegEx
Dim xFileName As String
On Error Resume Next
xFilePath = CreateObject("WScript.Shell").SpecialFolders(16)
xFilePath = xFilePath & "\MyEmails"
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FolderExists(xFilePath) = False Then
FSO.CreateFolder (xFilePath)
End If
Set xRegEx = CreateObject("vbscript.regexp")
xRegEx.Global = True
xRegEx.IgnoreCase = False
xRegEx.Pattern = "\||\/|\<|\>|""|:|\*|\\|\?"
If objItem.Class = olMail Then
Set xMailItem = objItem
xFileName = xRegEx.Replace(xMailItem.Subject, "")
xMailItem.SaveAs xFilePath & "\" & xFileName & ".html", olHTML
End If
Exit Sub
End Sub

3. Speichern Sie den VBA-Code und starten Sie Microsoft Outlook neu.

Von nun an wird jede eingehende E-Mail als einzelne HTML-Datei im Ordner „MyEmails“ gespeichert.

Notizen:
(1) Dieses VBA erstellt einen Ordner mit dem Namen „MyEmails“ im Ordner „Dokumente“. Die automatisch gespeicherten E-Mails können Sie über diesen Ordnerpfad herausfinden: C:\Benutzer\Ihr_Benutzername\Dokumente\MyEmails
(2) Dieses VBA funktioniert mit E-Mails, die im Posteingangsordner des Standard-E-Mail-Kontos empfangen werden.


Ähnliche Artikel


Beste Office-Produktivitätstools

Kutools for Outlook - Über 100 leistungsstarke Funktionen zur Optimierung Ihres Outlooks

🤖 KI-Mail-Assistent: Sofortige Profi-E-Mails mit KI-Magie – geniale Antworten mit einem Klick, perfekter Ton, mehrsprachige Beherrschung. Verwandeln Sie den E-Mail-Versand mühelos! ...

📧 E-Mail Automation: Abwesenheit (verfügbar für POP und IMAP)  /  Planen Sie das Senden von E-Mails  /  Automatisches CC/BCC nach Regeln beim E-Mail-Versand  /  Automatische Weiterleitung (erweiterte Regeln)   /  Begrüßung automatisch hinzufügen   /  Teilen Sie E-Mails mit mehreren Empfängern automatisch in einzelne Nachrichten auf ...

📨 E-Mail-Management: E-Mails einfach abrufen  /  Blockieren Sie betrügerische E-Mails nach Betreff und anderen  /  Doppelte E-Mails löschen  /  Erweiterte Suche  /  Ordner konsolidieren ...

📁 Anhänge ProBatch speichern  /  Stapeltrennung  /  Stapelkomprimierung  /  Automatisches Speichern   /  Automatische Trennung  /  Automatische Komprimierung ...

???? Schnittstellenmagie: 😊Mehr hübsche und coole Emojis   /  Steigern Sie Ihre Outlook-Produktivität mit Registerkartenansichten  /  Ausblick minimieren statt schließen ...

👍 Wunder mit einem Klick: Allen mit eingehenden Anhängen antworten  /   Anti-Phishing-E-Mails  /  🕘Zeitzone des Absenders anzeigen ...

👩🏼‍🤝‍👩🏻 Kontakte und Kalender: Fügen Sie Kontakte aus ausgewählten E-Mails im Stapel hinzu  /  Teilen Sie eine Kontaktgruppe in einzelne Gruppen auf  /  Geburtstagserinnerungen entfernen ...

Auf über 100 Eigenschaften Warten Sie auf Ihre Erkundung! Klicken Sie hier, um mehr zu erfahren.

 

 

Comments (6)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I need to change the folder for one i created (no need folder inbox), and i need to change the folder to store the msg files, in my case in drive e:., thank!!!
This comment was minimized by the moderator on the site
Can i have a certain report that is emailed to me each week save to a place on my hard drive? Just this one email. Comes from same email address and has the same title each week.
This comment was minimized by the moderator on the site
Could you advise how to change this to another folder, not the Inbox?
This comment was minimized by the moderator on the site
Dzień doby, robię wszystko tak jak opisane powyżej, mimo to makro nie chce działać. Czy muszę włączyć jakieś opcję albo zmienić coś w kodzie?
Nie wywala błędu jednak nie tworzy się folder a plik się nie zapisuje.

Będę bardzo wdzięczna za odpowiedź

Pozdrawiam serdecznie
This comment was minimized by the moderator on the site
How can I add the sender's email address to the file name?
This comment was minimized by the moderator on the site
Buonasera, è possibile modificare questo script con una versione che prevede di spostare i messaggi che arrivano in altra cartella anzichè quella classica della posta in arrivo? In altri termini, vorrei salvare automaticamente le mail che arrivano per esempio in Posta in Arrivo\Cliente1
grazie per la collaborazione
max
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations