none
CreateItemFromTemplate - Inconsistent behavior with graphics in template RRS feed

  • Question

  • I have some code that is generating emails using Microsoft.Office.Interop.Outlook (Fully qualified for clarity).

                Microsoft.Office.Interop.Outlook.Application application = new Application();
                Microsoft.Office.Interop.Outlook.MailItem mailItem = string.IsNullOrEmpty(TemplatePath) ? application.CreateItem(OlItemType.olMailItem) : application.CreateItemFromTemplate(TemplatePath);
    

    When TemplatePath is provided and the email is generated from the template, everything works mostly as intended - except that on the majority of workstations, the graphics (a single logo) in the template are missing from the email.

    The graphic is not linked - but embedded as evidenced by file size differences to ensure this is the case (33KB without logo, 74 KB with).

    On the workstations where the graphic does not show, the same user can double click on the template file and an email editor pops up with the template - including the logo.  So, the API is somehow not behaving the same as the actual user interaction on the same workstation with the same logged in user trying to spin up an email from the same template.

    Incidentally, I've tried both .msg and .oft with the same results.

    Any ideas?


    Friday, May 17, 2019 4:17 PM

All replies