I'm trying to build a cdo 1.2 messaging application in vb6. When I have the following code:
Set oSession = CreateObject("mapi.session")
I get the following error when i try to run...
ActiveX component can't create object.
I have included the cdo.dll in my project references.
Visual Basic Classic
Last Comment
Fraser_Admin
8/22/2022 - Mon
Jim Horn
{Just as a wild guess}
Do you have this line before your Set statement
Dim oSession as MAPI.Session
Fraser_Admin
ASKER
hehehe yep. i think the problem may be due to the fact that when outlook was installed the cdo stuff wasn't.
i tried just copying the cdo.dll to the proper directory, but maybe there is more to the installation that needs to be done?
Jim Horn
>i tried just copying the cdo.dll to the proper directory,
{Another wild guess, I'm on a roll...}
If you just copied the file, you still need to register it. Go to Start button, run, type the below line, hit Ok button (requires some renaming):
Do you have this line before your Set statement
Dim oSession as MAPI.Session