K
klwemu
Hi
Here is a very simple function, that works not on WinXP Off2K System.
When i call the function approx. 5 times, VB crashs! When i deactivate
the Debug Line all is fine. So the problem is th access to the Sender
Object.
Have anybody ideas about the reason? I am using CD0 1.21
Function GetSenderData()
Dim session As MAPI.session
Dim messages As MAPI.messages
Dim inbox As MAPI.folder
Set session = CreateObject("MAPI.Session")
session.Logon NewSession:=False
Set inbox =
session.GetDefaultFolder(CdoDefaultFolderTypes.CdoDefaultFolderInbox)
Debug.Print inbox.messages(1).Sender.Type ' <<< Crash Line!
' session.Logoff
' Set session = Nothing
' Set messages = Nothing
End Function
Here is a very simple function, that works not on WinXP Off2K System.
When i call the function approx. 5 times, VB crashs! When i deactivate
the Debug Line all is fine. So the problem is th access to the Sender
Object.
Have anybody ideas about the reason? I am using CD0 1.21
Function GetSenderData()
Dim session As MAPI.session
Dim messages As MAPI.messages
Dim inbox As MAPI.folder
Set session = CreateObject("MAPI.Session")
session.Logon NewSession:=False
Set inbox =
session.GetDefaultFolder(CdoDefaultFolderTypes.CdoDefaultFolderInbox)
Debug.Print inbox.messages(1).Sender.Type ' <<< Crash Line!
' session.Logoff
' Set session = Nothing
' Set messages = Nothing
End Function