title image


Smiley Re: vorhandene Mail mit vb öffnen?! Wozu ....
Hi Markus,



probiers mal damit!



Mit dem Code, lese ich Meine Emails aus meinen zweiten Ordner unter meiner Inbox aus.





Gruß



Stephan





Dim WithEvents colCustomersItems As Outlook.Items

Dim olApp As Outlook.Application

Dim nmsName As NameSpace

Dim fldFolder As MAPIFolder

Dim strFolderPath As String

Dim objMsgItem As Outlook.MailItem







Private Sub Form_Load()



Call Folderpaths



End



End Sub



Sub Folderpaths()





Set olApp = Outlook.Application

'Create namespace reference

Set nmsName = olApp.GetNamespace("MAPI")

'create folder instance

Set fldFolder = nmsName.GetDefaultFolder(olFolderInbox)

'call sub program

Call FolderInfo(fldFolder)



End Sub





Sub FolderInfo(ByVal fldFolder As MAPIFolder)

'Displays information about a given folder

Dim i As Long

Dim lngCount As Long

Dim strTest As String



lngCount = fldFolder.folders.Item(2).Items.Count



If lngCount = 0 Then

Exit Sub

End If





For i = 1 To lngCount



Select Case i



Case lngCount

Set objMsgItem = fldFolder.folders.Item(2).Items.GetLast

Call requestAppointment(objMsgItem.Body)

'objMsgItem.Delete



Case Else

Set objMsgItem = fldFolder.folders.Item(2).Items.Item(i)

Call requestAppointment(objMsgItem.Body)

'objMsgItem.Delete

End Select



Next i



End Sub



geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: