Solved

OLE automation and MAPI-problems

Posted on 1997-08-12
3
367 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
ID: 1430450
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
ID: 1430451
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
ID: 1430452
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

808 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