RE: Outlook 2007 SP2 issues
- From: alainr <alainr@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 May 2009 11:46:03 -0700
I should also add that this issue occurs when mail is received from a POP3
account to be delivered into my default folder's inbox.
Strangely, on one of the PC which also has an Exchange folder, mail received
from exchange also delivered into my default folder's inbox, triggers the
rule and runs through the script just fine wihtout generating a run-time
error.
I suspect there may be an issue with the msgItem object when it is received
specifically from a POP3 account.
"alainr" wrote:
Since I have applied Office 2007 SP2, some of my VBA macros triggered by.
rules on incomming mail generate a run-time error. I have reduced the
problem to the following:
1) Create a rule to run a script when a message containing "test" in the
subject arrives (this works fine)
2) The script configured to run is:
Sub TestMapiRule(msgItem As Outlook.MailItem)
Dim objSession As New MAPI.Session
objSession.Logon "", "", False, False, 0 ' Use the existing Outlook
session
MsgBox "test"
objSession.Logoff
Set objSession = Nothing
End Sub
3) When a message arrives and triggers the rule I get the following runtime
error:
Run-time error '-2147417850 (80010106)'
Automation error
Cannot change thread mode after it is set
<End> <Debug>
- The error is triggered by the line "objSession.Logon..." and the
message box never appears.
If I choose the <Debug>, Outlook crashes completely (actually as soon as I
open the VBA editor to attempt any debugging of this issue, Outlook
completely crashes). Selecting <End> kills the script in its tracks and
normal operation of Outlook resumes.
Could anyone with Outlook 2007 SP2 please try to reproduce this issue?
Please let me know if you have observed similar or related issues since
applying OL2007 SP2.
Please let me know if you have any ideas on the possible causes for this
issue.
* Runing Windows XP SP3, all code was running fine before applying SP2 and
nothing was changed just before or after SP2 was applied.
- References:
- Outlook 2007 SP2 issues
- From: alainr
- Outlook 2007 SP2 issues
- Prev by Date: RE: Outlook 2007 SP2 issues
- Next by Date: Re: Save Operation Failed error
- Previous by thread: RE: Outlook 2007 SP2 issues
- Next by thread: RE: Outlook 2007 SP2 issues
- Index(es):
Relevant Pages
|