Solved

OLE automation and MAPI-problems

Posted on 1997-08-12
3
366 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

895 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

13 Experts available now in Live!

Get 1:1 Help Now