I am using MAPI controls in my VB6 program to send emails to people and attach files. The code I have used so far is:
This works fine for sending one attachment to one recipient. But how do I add multiple attachments or recipients? I have read about the attachmentIndex property and so on but have no idea how to use it.
Thanks for your help.
Stuart
Code:
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = "stuartcomm@yahoo.com"
MAPIMessages1.AddressResolveUI = True
MAPIMessages1.ResolveName
MAPIMessages1.MsgSubject = "Sales Report"
MAPIMessages1.MsgNoteText = "Reports"
MAPIMessages1.AttachmentPathName = "C:\Program Files\Ordertracker\yorksales.pdf"
MAPIMessages1.Send
MAPISession1.SignOff
This works fine for sending one attachment to one recipient. But how do I add multiple attachments or recipients? I have read about the attachmentIndex property and so on but have no idea how to use it.
Thanks for your help.
Stuart