which reference has to be used for mapi

H

Hans

I'm trying to send an email in ms access via mapi.

The code stops on the statement with a compiler error:

Dim clMAPI As clsMAPI

It seems that I don't have a reference to the right mapi library.
My pc runs on Windows XP home. I allready added

"microsoft CDO for windows 2000 library"
and
"messenger api type library"

but that does not seem to help.
Which reference library do i need to be able to work with mapi?

Regards,
Hans

***************************

I'm using the next code:


Dim clMAPI As clsMAPI
Set clMAPI = New clsMAPIEmail
With clMAPI
.MAPILogon
.MAPIAddMessage
.MAPISetMessageBody = "Test Message"
.MAPISetMessageSubject = "Some Test"
.MAPIAddRecipient stPerson:[email protected], _
intAddressType:=1 'To
.MAPIAddRecipient stPerson:[email protected], _
intAddressType:=2 'cc
.MAPIAddRecipient stPerson:[email protected], _
intAddressType:=3 'bcc

.MAPIAddAttachment "C:\temp\Readme.doc", "Jet Readme"
.MAPIAddAttachment stFile:="C:\config.sys"

.MAPIUpdateMessage
.MAPISendMessage boolSaveCopy:=False
.MAPILogoff
End With
 
Top