Thema Datum  Von Nutzer Rating
Antwort
11.02.2020 15:53:10 Dirk
NotSolved
12.02.2020 07:38:27 Torsten
NotSolved
05.08.2023 22:46:25 FurysAssassin
NotSolved
Blau Outlook Attachments aus mehreren Emails speichern
08.08.2023 15:48:16 Gast95954
NotSolved
08.08.2023 20:37:23 Gast76593
NotSolved
12.02.2020 07:53:28 Torsten
*****
NotSolved
17.02.2020 13:42:50 René Wiesenhöfer
NotSolved
17.02.2020 14:04:35 Torsten
NotSolved
17.02.2020 14:21:58 René
NotSolved
17.02.2020 14:26:28 Torsten
NotSolved
18.02.2020 08:08:02 Torsten
*****
NotSolved
18.02.2020 08:15:09 René
NotSolved

Ansicht des Beitrags:
Von:
Gast95954
Datum:
08.08.2023 15:48:16
Views:
242
Rating: Antwort:
  Ja
Thema:
Outlook Attachments aus mehreren Emails speichern

Hallo,

ich hab mal etwas geaendert. Ann den Dateinamen wird das aktuelle Datum angehaengt. Das sollte die Datei dann einmaliger machen, wenigstens fuer einen Tag. Hoffe das hilft.

Public Sub SaveAttachments()
Dim objOL As Outlook.Application
Dim objMsg As Outlook.MailItem 'Object
Dim objAttachments As Outlook.Attachments
Dim objSelection As Outlook.Selection
Dim i As Long
Dim lngCount As Long
Dim strFile As String
Dim strFolderpath As String
Dim strDeletedFiles As String

    ' Get the path to your My Documents folder
    strFolderpath = CreateObject("WScript.Shell").SpecialFolders(16)
    On Error Resume Next

    ' Instantiate an Outlook Application object.
    Set objOL = CreateObject("Outlook.Application")

    ' Get the collection of selected objects.
    Set objSelection = objOL.ActiveExplorer.Selection

' The attachment folder needs to exist
' You can change this to another folder name of your choice

    ' Set the Attachment folder.
    strFolderpath = strFolderpath & "\Türkei\"

    ' Check each selected item for attachments.
    For Each objMsg In objSelection

    Set objAttachments = objMsg.Attachments
    lngCount = objAttachments.Count

    If lngCount > 0 Then

    ' Use a count down loop for removing items
    ' from a collection. Otherwise, the loop counter gets
    ' confused and only every other item is removed.

    For i = lngCount To 1 Step -1

    ' Get the file name.
    strFile = objAttachments.Item(i).Filename + Date       'Hier die Aenderung

    ' Combine with the path to the Temp folder.
    strFile = strFolderpath & strFile

    ' Save the attachment as a file.
    objAttachments.Item(i).SaveAsFile strFile

    Next i
    End If

    Next

ExitSub:

Set objAttachments = Nothing
Set objMsg = Nothing
Set objSelection = Nothing
Set objOL = Nothing
End Sub

Gruss Torsten


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
11.02.2020 15:53:10 Dirk
NotSolved
12.02.2020 07:38:27 Torsten
NotSolved
05.08.2023 22:46:25 FurysAssassin
NotSolved
Blau Outlook Attachments aus mehreren Emails speichern
08.08.2023 15:48:16 Gast95954
NotSolved
08.08.2023 20:37:23 Gast76593
NotSolved
12.02.2020 07:53:28 Torsten
*****
NotSolved
17.02.2020 13:42:50 René Wiesenhöfer
NotSolved
17.02.2020 14:04:35 Torsten
NotSolved
17.02.2020 14:21:58 René
NotSolved
17.02.2020 14:26:28 Torsten
NotSolved
18.02.2020 08:08:02 Torsten
*****
NotSolved
18.02.2020 08:15:09 René
NotSolved