Solved

OLE automation and MAPI-problems

Posted on 1997-08-12
3
370 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

739 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