Attaching files to mails using Outlook Object model.

  • Thread starter Thread starter Sukhvinder Lamba via OfficeKB.com
  • Start date Start date
S

Sukhvinder Lamba via OfficeKB.com

I'm writing an Outlook Addin using ATL/C++. I create an mail object and
would like to add attachments to mail before i send it. Below is the code i
already have:

_MailItemPtr mail(ptrIDispatch);

mail->put_Subject((BSTR)showFCNDialog.m_strSubject);
mail->put_Body((BSTR)showFCNDialog.m_strMessage);
mail->put_To((BSTR)showFCNDialog.m_strRecipient);

Now, I need to know how can i attach any file to this mail object. I didn't
find any method to attach files in mail object.
 
Back
Top