Hi,
Do you have multiple outlook profiles on this PC? You can check the list of profiles in the registry \HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles.
Try to login explicitly
oNameSpace.Logon("ProfileName", "Password")
BTW, what's the value of olMailItem outlook constant in your program?
>Hi Sergey,
>
>thanks for the advice. Though, after applying it, I still get the error on oMessage = oOutlook.CreateItem(olMailItem).
>
>The advice was to create NameSpace (oNameSpace = oOutlook.GetNameSpace("MAPI")
>) after initializing Outlook object. The NameSpace gets created, TYPE('oNameSpace')='O' after.
>
>
>>Hi Sasha,
>>
>>Take a look at Message #
398853.
>>
< snip >
--sb--