Solved

OLE automation and MAPI-problems

Posted on 1997-08-12
3
364 Views
Last Modified: 2010-05-18
HI folks!

1. I have been trying to get Brad Wist's sourcecode about sending faxes and mail, to work.

I have the typelibrary for OLE Messaging 1.0 but when I try to run the following lines..

Dim objSession As Object

 Set objSession = GetObject("MAPI.SESSION")

I get "Runtime Error '429' OLE Automation server can't create object" .

I have searched the registry for a reference to MAPI.SESSION, but no luck. Why does'nt this work?
I have the MAPI32.DLL installed. How come "MAPI.SESSION" is not registered.
Am I missing a DLL?


2 Is there a text/help file somewhere with documentation for the MAPI.DLL and its functions?

Terje
0
Comment
Question by:Terje
3 Comments
 
LVL 9

Accepted Solution

by:
cymbolic earned 200 total points
Comment Utility
In looking for a running instance, I think the syntax is:

set objsession=GetObject(,"MAPI.SESSION")

Note the comma, missing form your sample code
0
 

Author Comment

by:Terje
Comment Utility
Fair enough!

My question did not say so, but I tried "CreateObject" and the error in the "GetObject" syntax was a typing mistake. I am afraid I still don't know which DLL is the OLEMessaging Server.  -  But it is not your fault that I did not describe this problem properly. So, please have these points, and ...

... happy programming! It's fun :-)

Terje

I wish I was as passionate
as this with my religion too!
0
 
LVL 3

Expert Comment

by:graver
Comment Utility
When attempting to connect to an existing instance of the MAPI session you would use the following code:

Set objSession = GetObject("", "MAPI.Session")

or, to create a new instance:

Set objSession = CreateObject("MAPI.Session")

The DLL you are looking for is call OLEMSG32.DLL, in the SYS directory.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now