Word crashes when doing mail merge in Office 2010 RRS feed

  • Question

  • Hi,

     We have an addin in Outlook which intercepts the Send handler of Outlook. The reason we intercept this event is because we want to remove hyperlinks from the email which our addin creates.

    Code snippet:

    private void ApplicationItemSend(object item, ref bool cancel)

                Inspector inspector = null;

                MailItem mail = item as MailItem;
                Word.Document document = null;
                    if (mail != null)
                        inspector = mail.GetInspector;


                if (inspector == null)

                 document = (Word.Document)inspector.WordEditor;


                Invoke method to cleanup hyperlinks passing the document object as param. We use the document.StoryRanges to iterate through all the hyperlinks



    Now, in Word we want to do a mail merge. We then copy an image from an existing email and paste it into Word. We then select the Recipients list. Click on Finish & Merge to send the email. We use all the default options like HTML, etc when email is sent. Now our Send handler in Outlook is invoked and voila Word crashes! The crash is occuring when accessing any of the document object properties like StoryRanges, etc. This is only happening when we pasted image from email in Word using Ctrl+V. When I pasted the image in Word using Home-->Paste--> Picture from the Word ribbon, the crash does not occur. In fact, it does not crash if I first copied the image say to Paint program and then copied the image from Paint. This definitely appears to be a Microsoft issue as we don't see the same in Office 2013

    Any help would be much appreciated.

    Thanks in advance!

    Wednesday, March 12, 2014 10:23 PM

All replies

  • Hello Nev24,

    Could you please specify the edition of your Outlook (x64 or x86) and its version including the build number?

    Thursday, March 13, 2014 12:04 AM
  • Hi Eugene,

     It is 32-bit of Office 2010 (Microsoft Office Professional Plus 2010)

    Version of Outlook: 14.0.7113.5005

    Version of Word: 14.0.7113.5005



    Thursday, March 13, 2014 1:15 AM
  • Hi Nev,

    I will try to reproduce the issue in one of my virtual machines and let you know my results tomorrow.

    Thursday, March 13, 2014 11:09 AM
  • Thanks Eugene! I will await your response on this.
    Thursday, March 13, 2014 11:24 AM