Live-Forum - Die aktuellen Beiträge
Datum
Titel
24.04.2024 19:29:30
24.04.2024 18:49:56
24.04.2024 17:19:09
Anzeige
Archiv - Navigation
184to188
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
184to188
184to188
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

Outlookfrage - sorry

Outlookfrage - sorry
22.11.2002 11:04:20
Chiren
Hallo,

ich will mit Excel ein Outlookpostfach auslesen und den Inhalt in ein anderes schreiben. Aber irgendwie funktioniert das nicht so wie ich es will. Kennt jemand eine Funktion dafür? Copy befehl oder so???

Gruß
Chiren

Codebeispiel:

Dim objOutlook As Object
Dim objnSpace As Object
Dim objFolder As Object
Dim objMsg As Object
Dim intCounter As Integer, intCount As Integer, iRow As Integer
Dim sTxt As String
Application.ScreenUpdating = False
Set objOutlook = CreateObject("Outlook.Application")
Set objnSpace = objOutlook.GetNamespace("MAPI")
Set objFolder = objnSpace.Folders("Postfach - Molanda John").Folders("Gelöschte Objekte") ' "Posteingang"
Set destFolder = objnSpace.Folders("Postfach - Molanda John").Folders("Ablagen")
intCount = objFolder.Items.Count
MsgBox (intCount)
If intCount = 0 Then
MsgBox "Keine Bestellung vorhanden!"
End
End If
For i = 1 To intCount
Set objMsg = objFolder.Items(1)
With objMsg.Attachments.Items(1)
.SaveAsFile "c:\bestellungen\" & .Filename
End With
'********
' wie kopiere ich die Mail vom obj.folder in den dest.folder ???
'********


objMsg.Delete
Next i
Set objOutlook = Nothing
Set objFolder = Nothing
Set destFolder = Nothing

1
Beitrag zum Forumthread
Beitrag zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
Re: Outlookfrage - sorry
22.11.2002 13:08:58
Andreas Schindlder
Da hast Du einen kleinen Fehler:

es heißt:
with objMsg.Attachments.Item(1) nicht Items....

anstelle von obj.Msg.delete würde ich

objMsg.Move destFolder

verwenden. Dann ist der Mist aus dem Eingangskasten auch draußen.

Andreas

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige