Mapi with Lotus Notes in VB.NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kani

    Mapi with Lotus Notes in VB.NET

    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.tx t"
    .lpszFileName = "C:\test.tx t"
    .nPosition = 0
    .flFlags = 0
    .lpFileType = 0
    End With

    And mapiMessage.nFi leCount = 1
    mapimessage.lpF iles = mFile

    Public Declare Auto Function MapiSendMail Lib "Mapi32.dll " Alias
    "MAPISendMa il" _
    (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
    "MAPISendMa il" _
    (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
Working...