Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching more than one file to an email in VB

Status
Not open for further replies.

kprog

Programmer
Jul 21, 2003
13
0
0
CA
I am trying to attach more than one file to the an email using the MappiSession objects. My code looks like this...

MAPISession1.LogonUI = True
MAPISession1.SignOn
MAPMess.SessionID = MAPISession1.SessionID
MAPMess.Compose
MAPMess.RecipAddress = "emailaddress"
MAPMess.ResolveName
MAPMess.MsgSubject = "Testing Email"

MAPMess.AttachmentPathName = "c:\test1.txt"
MAPMess.AttachmentPathName = "c:\test2.txt"

MAPMess.Send False
MAPISession1.SignOff

This code overwrites the first attachment with the second.

Any suggestions?

Thanks.
 
Look up the AttachmentIndex Property for the Mapi controls

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top