我正在尝试使用VB6 MAPIMessages
控件发送包含多个附件的电子邮件。
1)我可以使用此控件发送单个附件,但如果我尝试发送多个文件,则会显示错误“未找到附件”。
2)我还需要在尝试发送电子邮件时取消警告消息
有什么想法吗?
以下是代码:
MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipDisplayName = "abbid_siddiqui@hotmail.com"
MAPIMessages1.MsgSubject = "MAPI subject with attachments"
MAPIMessages1.MsgNoteText = "This is atest"
MAPIMessages1.AttachmentIndex = 0
MAPIMessages1.AttachmentName = "test.csv"
MAPIMessages1.AttachmentPathName = "C:\test.csv"
MAPIMessages1.AttachmentIndex = 1
MAPIMessages1.AttachmentName = "holidays_2013.xls"
MAPIMessages1.AttachmentPathName = "E:\holidays_2013.xls"
MAPIMessages1.ResolveName
'Send the e-mail message to the Recipient
MAPIMessages1.Send
答案 0 :(得分:1)
尝试将AttachmentPosition
属性设置为与AttachmentIndex