Direkt zum Inhalt

 Wie exportiere ich Kontaktinformationen mit Fotos in Outlook?

Wenn Sie Kontakte aus Outlook in eine Datei exportieren, können nur die Textinformationen der Kontakte exportiert werden. Manchmal müssen jedoch die Fotos sowie die Textinformationen der Kontakte exportiert werden. Wie können Sie mit dieser Aufgabe in Outlook umgehen?

Exportieren Sie die Kontaktinformationen mit relativen Fotos mithilfe des VBA-Codes


Exportieren Sie die Kontaktinformationen mit relativen Fotos mithilfe des VBA-Codes

Der folgende VBA-Code kann Ihnen helfen, alle Kontakte in einem bestimmten Kontaktordner in eine separate Textdatei mit Fotos zu exportieren. Bitte machen Sie Folgendes:

1. Wählen Sie einen Kontaktordner aus, in den Sie die Kontakte mit Fotos exportieren möchten.

2. Und dann halten Sie die ALT + F11 Schlüssel zum Öffnen der Microsoft Visual Basic für Applikationen Fenster.

3. Dann klick Insert > Modul, kopieren Sie den folgenden Code und fügen Sie ihn in das geöffnete leere Modul ein, siehe Screenshot:

VBA-Code: Kontaktinformationen mit Fotos exportieren:

Sub BatchExportContactPhotosandInformation()
Dim xContactItems As Outlook.Items
Dim xItem As Object
Dim xContactItem As ContactItem
Dim xContactInfo As String
Dim xShell As Object
Dim xFSO As Scripting.FileSystemObject
Dim xTextFile As Scripting.TextStream
Dim xAttachments As Attachments
Dim xAttachment As Attachment
Dim xSavePath, xEmailAddress As String
Dim xFolder As Outlook.Folder
On Error Resume Next
Set xFSO = CreateObject("Scripting.FileSystemObject")
Set xShell = CreateObject("Shell.application").BrowseforFolder(0, "Select a Folder", 0, 16)
If xShell Is Nothing Then Exit Sub
xSavePath = xShell.Items.Item.Path & "\"
If Outlook.Application.ActiveExplorer.CurrentFolder.DefaultItemType <> olContactItem Then
    Set xFolder = Outlook.Application.Session.GetDefaultFolder(olFolderContacts)
Else
    Set xFolder = Outlook.Application.ActiveExplorer.CurrentFolder
End If
Set xContactItems = xFolder.Items
For i = xContactItems.Count To 1 Step -1
    Set xItem = xContactItems.Item(i)
    If xItem.Class = olContact Then
        Set xContactItem = xItem
        With xContactItem
            xEmailAddress = .Email1Address
            If Len(Trim(.Email2Address)) <> 0 Then
                xEmailAddress = xEmailAddress & ";" & .Email2Address
            End If
            If Len(Trim(.Email3Address)) <> 0 Then
                xEmailAddress = xEmailAddress & ";" & .Email3Address
            End If
            xContactInfo = "Name: " & .FullName & vbCrLf & "Email: " & _
                           xEmailAddress & vbCrLf & "Company: " & .CompanyName & _
                           vbCrLf & "Department: " & .Department & _
                           vbCrLf & "Job Title: " & .JobTitle & _
                           vbCrLf & "IM: " & .IMAddress & _
                           vbCrLf & "Business Phone: " & .BusinessTelephoneNumber & _
                           vbCrLf & "Home Phone: " & .HomeTelephoneNumber & _
                           vbCrLf & "BusinessFax Phone: " & .BusinessFaxNumber & _
                           vbCrLf & "Mobile Phone: " & .MobileTelephoneNumber & _
                           vbCrLf & "Business Address: " & .BusinessAddress
            Set xTextFile = xFSO.CreateTextFile(xSavePath & .FullName & ".txt", True)
            xTextFile.WriteLine xContactInfo
            If .Attachments.Count > 0 Then
                Set xAttachments = .Attachments
                For Each xAttachment In xAttachments
                    If InStr(LCase(xAttachment.FileName), "contactpicture.jpg") > 0 Then
                        xAttachment.SaveAsFile (xSavePath & .FullName & ".jpg")
                    End If
                Next
            End If
        End With
    End If
Next i
End Sub

doc exportiert Kontakte mit Fotos 1

4. Klicken Sie nach dem Einfügen des Codes in das Modul weiter Tools > Bibliographie der Microsoft Visual Basic für Applikationen Fenster, in dem heraussprang Referenzen-Projekt1 Dialogfeld überprüfen Microsoft Scripting-Laufzeit Option von der Verfügbare Referenzen Listenfeld, siehe Screenshot:

doc exportiert Kontakte mit Fotos 2

5. Klicken Sie OK um den Dialog zu schließen, und drücken Sie dann F5 Schlüssel, um diesen Code auszuführen, in der herausgesprungenen Suche nach Ordner Geben Sie im Dialogfeld einen Ordner an, in dem Sie die exportierten Kontakte ausgeben möchten. Siehe Screenshot:

doc exportiert Kontakte mit Fotos 3

6. Dann klick OKAlle Informationen mit den Fotos der Kontakte wurden separat in Ihren Ordner exportiert, siehe Screenshot:

doc exportiert Kontakte mit Fotos 4


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 (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Do you know that many (every ?) OpenSource alternative to Outlook are able to export contacts in vcard format, with all details and photos ?
Just with one click, no need to write any code...
Incredible, isn't it ?
This comment was minimized by the moderator on the site
It's because Oulook / Exchange are not free, you need to pay for everything ! :-)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations