![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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.Cdo DefaultFolderInbox) Debug.Print inbox.messages(1).Sender.Type ' Crash Line! ' session.Logoff ' Set session = Nothing ' Set messages = Nothing End Function |
#2
|
|||
|
|||
![]() |
#3
|
|||
|
|||
![]()
On 30 Nov., 17:28, Dan Mitchell wrote:
wrote in news:c2063db6-5f4c-478a-beca-4358ad1cad94 @o42g2000hsc.googlegroups.com: Debug.Print inbox.messages(1).Sender.Type ' Crash Line! Which bit of this line crashes? If you do this, which one has the problem? mapi.messages messages = inbox.messages mapi.message message = messages.getfirst mapi.addressentry snd = message.sender debug.print snd.type Also, what happens if you uncomment the logout code at the end? What happens if you log in once per run and use the same logged in session all the time, rather than logging in once per getsenderdata call? -- dan Hi Dan! The diasbled logout code does not happen to the problem. Enablend/ Disabled makes no difference. It seems that the problem occours when i access (in any case) the "Sender" Object up to 4-8 times. klwemu |
#4
|
|||
|
|||
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Variable for email address sender | Jan Kuijt[_2_] | Outlook - Using Forms | 1 | September 25th 07 07:04 PM |
Sender email address (yourself) | pjerling | Add-ins for Outlook | 1 | September 24th 07 07:27 PM |
default address when replying to sender | Jim | Outlook Express | 5 | April 15th 07 08:37 PM |
how to make all email address in my address book "safe sender"? | ay | Outlook - General Queries | 3 | March 6th 07 11:05 PM |
How to find out the IP address of sender? | crispy | Outlook - General Queries | 2 | January 20th 07 01:55 AM |