a table border is missing after the email is received

Discussion in 'Microsoft Outlook VBA Programming' started by JD, Sep 14, 2012.

  1. JD

    JD Guest

    Hi,

    I programmatically create an outlook email item, copy a table from a Words document, paste to the embedded word editor in the email item, and then send the item. The email on the receiver side has the table border missing, while the sender side looks perfectly fine. Can anybody think of any reasonwhy this happen? Any hint is much appreciated.

    JD

    ps. here is a code snippet for your reference,

    if (!_objOutlookApp)
    return false;

    CComPtr<Outlook::_MailItem> olMail;
    if (!GetMailItem(olMail))
    return false;

    olMail->PutBodyFormat(Outlook::blush:lFormatRichText);

    CComPtr<Outlook::_Inspector> insp = olMail->GetGetInspector();
    if (insp == NULL)
    return false;

    insp->Activate();
    enum Outlook::OlEditorType nType = insp->GetEditorType();
    if (nType != Outlook::blush:lEditorWord)
    return false;

    CComPtr<IDispatch> pDisp = insp->GetWordEditor();
    if (!pDisp)
    return false;

    CComQIPtr<Word::_Document> pWordDoc(pDisp);
    CComPtr<Word::_Application> pWordApp;
    pWordDoc->get_Application(&pWordApp);

    if (!pWordDoc || !pWordApp)
    return false;

    CMSWordProcessor wordDoc;
    if (!wordDoc.AttachWordDoc(pWordDoc, pWordApp))
    return false;

    wordDoc.PasteFromClipboard();

    olMail->PutTo(sTo.AllocSysString());
    olMail->PutSubject(sSubject.AllocSysString());
    olMail->Send();

    wordDoc.DetachWordDoc();
     
    JD, Sep 14, 2012
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    create confirmation email in vba when email received

    Guest, Jan 22, 2004, in forum: Microsoft Outlook VBA Programming
    Replies:
    1
    Views:
    1,023
    Eric Legault [Outlook MVP]
    Jan 23, 2004
  2. gord9b

    Need fields in new email received

    gord9b, Mar 11, 2004, in forum: Microsoft Outlook VBA Programming
    Replies:
    1
    Views:
    192
    Sue Mosher [MVP-Outlook]
    Mar 12, 2004
  3. Rob F

    Holding text data in a received email

    Rob F, Mar 17, 2004, in forum: Microsoft Outlook VBA Programming
    Replies:
    1
    Views:
    233
    Ken Slovak - [MVP - Outlook]
    Mar 17, 2004
  4. Hcoms

    How to get the received date of an email

    Hcoms, Jun 14, 2004, in forum: Microsoft Outlook VBA Programming
    Replies:
    2
    Views:
    10,524
    Hcoms
    Jun 14, 2004
  5. Lasse Matsson

    Get Received date from a email

    Lasse Matsson, Sep 22, 2005, in forum: Microsoft Outlook VBA Programming
    Replies:
    1
    Views:
    2,037
    Sue Mosher [MVP-Outlook]
    Sep 22, 2005
  6. Guest

    MAPI Received Time 1 Hour Earlier Than Outlook 2003 Received Time

    Guest, Oct 26, 2005, in forum: Microsoft Outlook VBA Programming
    Replies:
    5
    Views:
    1,292
    Ken Slovak - [MVP - Outlook]
    Oct 28, 2005
  7. Tod

    Event when email is received

    Tod, Oct 28, 2005, in forum: Microsoft Outlook VBA Programming
    Replies:
    2
    Views:
    297
    Guest
    Oct 28, 2005
  8. Guest

    Fix received dates on items after importing from Outlook Express

    Guest, Sep 25, 2006, in forum: Microsoft Outlook VBA Programming
    Replies:
    1
    Views:
    280
    Guest
    Sep 25, 2006
Loading...