Discussion Locked

VB and Notes

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Currently I am using VBasic as the front interface and lotus notes as the delivery e-mail system. I have been able to notify people using this method, but I need to have notes open when my application runs in order to be able to auto-email. I want to get away from this method but I am lost. I also want to be able to attach documents. all this must happen automatically.
does anyone have an answer?
thanks

1 reply

by d4m0cl3s

If you don't need to use Notes then you may find this useful. It works with all MAPI compliant mail programs. Just make sure your prefered mail client is set up as your default MAPI host - Outlook Express 5 does it automatically.

Private Sub start_session()
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
End Sub

Private Sub end_session()
MAPISession1.SignOff
End Sub

Private Sub Command1_Click()
start_session
'Create new message
MAPIMessages1.Compose
'set the recipient info
MAPIMessages1.RecipDisplayName = SendToRealName
MAPIMessages1.RecipAddress = SendToEmailAddress
'set the subject line
MAPIMessages1.MsgSubject = Subject
'set the message
MAPIMessages1.MsgNoteText = Me.Body
'add an attatchment
MAPIMessages1.AttachmentPathName = AttatchmentFilePath
'You can add more files by repeating the statement
MAPIMessages1.Send False
end_session
End Sub

Hope it helps

This discussion is closed to new replies.