Issues with MS06-003 and Outlook 2003 Scripts.

I have a script that I use at work to send out emails every few days.

Last night, we installed MS06-003 on my workstation’s copy of Outlook, and today, my script fails.

The key function appears to be either CreateItemFromTemplate creating messages into the drafts folder, or GetDefaultFolder, supplying an object to the drafts folder.

Here’s a snippet…

Set oFolder = olApp.Session.GetDefaultFolder(olFolderDrafts)
Set oMail = olApp.CreateItemFromTemplate( oTemplate, oFolder )

The failure doesn’t occur on first running through this, but on the second hit of GetDefaultFolder, where the VB drops out with the helpful message: “Z:\Script\mailout.vbs(176, 3) (null): The server threw an exception.”

The underlying error number is -2147417851 – 0x80010105, RPC_E_SERVERFAULT. [I included all forms to make it easier for this article to pop up in searches.]

I don’t currently see this listed as a “known issue” for MS06-003.  Has anyone else seen this issue?

5 thoughts on “Issues with MS06-003 and Outlook 2003 Scripts.”

  1. Yes. We are having the EXACT same problem using .NET Microsoft.Office.Interop in C#. We are able to make one call to:

    GetDefaultFolder (to get the Drafts folder) and then
    CreateItemFromTemplate (to create a MailItem from an MSG file)

    This works the first time, but when this is done on a second MSG file message, it fails on the GetDefaultFolder and throws an exception with the message:
    The server threw an exception

  2. Microsoft acknowledges that this is a known issue with the MS06-003 Outlook 2003 security update and CreateItemFromTemplate. They have now released a Hotfix for this issue:

    KB913695 Outlook 2003 post-Service Pack 2 hotfix package: January 23, 2006:

    913707 Outlook 2003 unexpectedly quits after an item is created by programmatically using the CreateItemFromTemplate method

    Here is the URL to get description of the fix and link to download it.

    Note this link is an self extracting .exe that contains two .msp files. The one named OUTLOOKff.msp is easiest for users to use as it doesn’t require them to have access to initial CD or folder.

    Engineer also made this comment.
    It is my understanding that this will also be pushed out from Microsoft update as a high priority fix but I do not have a date on when that will be pushed out.

  3. Alan, I think you can also avoid it by omitting the second parameter from CreateItemFromTemplate. Since a message is always created with Drafts as the destination folder, you don’t need it in your scenario.

  4. That’s right, Sue – that’s the workaround that we figured out fairly quickly. I did wonder briefly if there might be a problem with other folders as the second parameter, but I couldn’t make it crash with a simple test or two.

  5. That’s great that there is a fix. However, the self extractor wants you to choose a folder to extract the files to. I just had this error happen so I have not had an opportunity to look into it. But, I have not been able to easily find the information on where to extract the files to. This seems to be a fairly obvious peice of information needed for most people who experience this problem.

Leave a Reply

Your email address will not be published. Required fields are marked *