By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,901 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

Mapi with Lotus Notes in VB.NET

P: n/a
Hi,

I am trying to use MAPI with Lotus Notes Client. (I have to use MAPI).
I have a MapiFile Object as folows.

Dim mFile(0) As MapiFile
With mFile(0)
.lpszPathName = "C:\test.txt"
.lpszFileName = "C:\test.txt"
.nPosition = 0
.flFlags = 0
.lpFileType = 0
End With

And mapiMessage.nFileCount = 1
mapimessage.lpFiles = mFile

Public Declare Auto Function MapiSendMail Lib "Mapi32.dll" Alias
"MAPISendMail" _
(ByVal pSession As Integer, _
ByVal pUIParam As Integer, _
ByRef pMsg As MapiMessage, _
ByVal pFlags As Integer, _
ByVal pReserved As Integer) As Integer

MapiSendMail(0, 0, msg, 0, 0)

I tried another way also. I included MapiFile in MapiSendMail function
as follows.

Public Declare Auto Function MapiSendMail Lib "Mapi32.dll" Alias
"MAPISendMail" _
(ByVal pSession As Integer, _
ByVal pUIParam As Integer, _
ByRef pMsg As MapiMessage, _
ByRef pFile As MapiFile, _
ByVal pFlags As Integer, _
ByVal pReserved As Integer) As Integer

And tried
MapiSendMail(0, 0, msg, mfile(0), 0, 0)

Both methods open a new message in Lotus Notes, but the attachments
are missing. Subject and body text are coming fine. I am programming
in VB.NET and I am not able to figure out what I am doing wrong.

Any help would greatly be appreciated.

Thank you
Kani
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.