RE: Outlook 2007 SP2 issues



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.
.



Relevant Pages

  • Add User / ConnectComputer script ... deleted existing email client, lost email?
    ... ConnectComputer script, two were successful and 2 lost their old email ... one was using Outlook XP and one ... before SP1) and were using Outlook 2000 as their email client. ... All 4 had only one external POP email account each before running the ...
    (microsoft.public.windows.server.sbs)
  • Inbox Disappears
    ... I started using Outlook 2003 about three months ago (switched from Outlook ... I have multiple POP accounts set up in Outlook, so I created a separate .pst ... file for each account, and created a separate Inbox folder under each .pst ... mail into the appropriate Inbox folder based on which account it was coming ...
    (microsoft.public.outlook)
  • Re: How do I forward all Administrator email to my account?
    ... rt-clk the inbox and add your standard user account to the permissions, ... his whole mailbox then 'open additional mailbox' in your Outlook profile ... reports, and backup reports. ...
    (microsoft.public.windows.server.sbs)
  • Re: Outlook 2002 rules problems
    ... Milly Staples [MVP - Outlook] ... account will be deleted without reading. ... | also leaves a message in my inbox. ... | to the MYEMAIL folder. ...
    (microsoft.public.outlook)
  • Outlook 2002 rules problems
    ... Subject: Re: Outlook 2002 rules problems ... >account will be deleted without reading. ... >| also leaves a message in my inbox. ... >| to the MYEMAIL folder. ...
    (microsoft.public.outlook)