none
word application freezes till VSTO addin execution finishes RRS feed

  • Question

  • HI,

           I have a word addin application. it has number of buttons in ribbon which process document. my word document/application freezes till addin finishes its execution. i can not switch to another document to view/edit it. Is this normal behavior  or Can we do anything to avoid this.

    version: Word 2007(also 2010)

    thanks



    shashank

    Friday, May 10, 2013 8:30 AM

Answers

  • it is a way office is implemented - disregarding multiple disjointed windows suggesting that they are independent, single process manages them all, so if you take over main thread of that process all of them will become unresponsive. there is not much you can do about this if you plan to stay within boundries of office process and do not switch to open XML manipulation outside of process. If most of the time you spend doing Network/db calls, you can offload them to background thread, but remeber that you can touch office objects only on main thread.
    Friday, May 10, 2013 12:54 PM

All replies

  • it is a way office is implemented - disregarding multiple disjointed windows suggesting that they are independent, single process manages them all, so if you take over main thread of that process all of them will become unresponsive. there is not much you can do about this if you plan to stay within boundries of office process and do not switch to open XML manipulation outside of process. If most of the time you spend doing Network/db calls, you can offload them to background thread, but remeber that you can touch office objects only on main thread.
    Friday, May 10, 2013 12:54 PM
  • Thanks D.

    shashank

    Monday, May 13, 2013 9:52 AM