Automatische Ablage von Anhängen - Serverbasierend - möglich?
Hallo Allseits,
mit dem folgenden Makro lege ich aktuell (mit OL7) alle Anhänge der Maileingänge automatisch ab.
Public WithEvents myOlItems As Outlook.Items
Private Sub Application_Startup()
Set myOlItems = _
Outlook.Session.GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub myOlItems_ItemAdd(ByVal Item As Object)
Const sPfad As String = "C:\temp10\"
Dim iAttachCnt As Integer
Dim i As Integer
If TypeName(Item) = "MailItem" Then
With Item.Attachments
iAttachCnt = .Count
If iAttachCnt > 0 Then
For i = 1 To iAttachCnt
.Item(i).SaveAsFile sPfad & .Item(i).FileName
Next i
End If
End With
End If
End Sub
Jetzt möchte ich die Sache gern von Exchange direkt - Serverbasierend - erledigen lassen.
Was muss dazu angepasst werden? „Nur“ mit einer Regel z.Bsp. ‚via‘ OWA geht es ja wohl nicht.
Bzw. ist dies überhaupt machbar?
Danke für Eure Hilfe.
Gruß Mephisti
mit dem folgenden Makro lege ich aktuell (mit OL7) alle Anhänge der Maileingänge automatisch ab.
Public WithEvents myOlItems As Outlook.Items
Private Sub Application_Startup()
Set myOlItems = _
Outlook.Session.GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub myOlItems_ItemAdd(ByVal Item As Object)
Const sPfad As String = "C:\temp10\"
Dim iAttachCnt As Integer
Dim i As Integer
If TypeName(Item) = "MailItem" Then
With Item.Attachments
iAttachCnt = .Count
If iAttachCnt > 0 Then
For i = 1 To iAttachCnt
.Item(i).SaveAsFile sPfad & .Item(i).FileName
Next i
End If
End With
End If
End Sub
Jetzt möchte ich die Sache gern von Exchange direkt - Serverbasierend - erledigen lassen.
Was muss dazu angepasst werden? „Nur“ mit einer Regel z.Bsp. ‚via‘ OWA geht es ja wohl nicht.
Bzw. ist dies überhaupt machbar?
Danke für Eure Hilfe.
Gruß Mephisti
Please also mark the comments that contributed to the solution of the article
Content-Key: 161493
Url: https://administrator.de/contentid/161493
Printed on: April 24, 2024 at 01:04 o'clock
5 Comments
Latest comment
Hallo Mephisti,
versteh ich nicht ganz, weil PDF und dann Text... - egal. Schau mal hier: http://www.msxfaq.de/admin/journal.htm
vielleicht hilft Dir das weiter.
vG
LS
die enthaltenen Anlagen (PDF-Dokumente) nach dem speichern in Textdateien zu konvertieren
versteh ich nicht ganz, weil PDF und dann Text... - egal. Schau mal hier: http://www.msxfaq.de/admin/journal.htm
vielleicht hilft Dir das weiter.
vG
LS