Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

OLE automation and MAPI-problems

Posted on 1997-08-12
3
Medium Priority
?
373 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 600 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Suggested Courses

688 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