Fix to start Outlook 2002 CreateItem Error

D

David L.

Following is the fix for an error to create email through
Outlook 2002, if Outlook is not originally started.

Dim olApp as Outlook.Application
Dim olMsg as Outlook.MailItem

Set olApp = New Outlook.Application
Set olMsg = olApp.CreateItemFromTemplate("blankemail.msg")
'Set olMsg = olApp.CreateItem(0) <- Not work in OL2002 if
not already started

I do not guarantee it will solve CreateItem problem for
other people with similar Outlook2002 create email error,
I suspect local installation variances (e.g. patch level,
initial config) contributed to these errors.

The original code still work on machines that had
Outlook2000 installed, and will start Outlook in the
background if necessary.

David
10 Oct 2003
 
K

Ken Slovak - [MVP - Outlook]

You can also log into the Outlook session and that should work for
CreateItem. NameSpace.Logon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top