Create an Attachments object from the mailitem object
then for each file you want to attach, add it to the Attachments objectCode:Attachments atts( myMailItemObject.GetAttachments() ;
Code:atts.Add( COleVariant("c:\filename.txt"), COleVariant((long)olByValue), COleVariant((long)DISP_E_PARAMNOTFOUND, VT_ERROR)/*==optional*/, COleVariant("Display name of the file"));




Reply With Quote