locked
Adding Word objects as attachments RRS feed

  • Question

  • Hi.  I've created a VS2005 C# program using Office 2007 to add Word documents as attachments via Outlook.

    But rather than sending Word docs via their  file/paths, I'm trying to send Word objects from a Collection of Word objects.

    After I run the program, I get the following error:

    Error sending email. Error is System.Runtime.InteropServices.COMException (0x80020003): Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND)) at Microsoft.Office.Interop.Outlook.Attachments.Add(Object Source, Object Type, Object Position, Object DisplayName)  at WordCollectionTest01.Program.SendEmail(WordDocItemCollection wordDocCollection) 

    WordDocItemCollection is the class I created for the collection.  And wordDocCollection is an instance.  I'm able to do different things with the those Word objects (i.e., find/replace; footer formatting; etc.), but cannot add them as attachments to an Outlook email.
    • Edited by yamaraashi Sunday, May 31, 2009 1:00 AM grammar
    Sunday, May 31, 2009 12:47 AM

Answers

All replies