none
Word2010- when a modal windows is opened, the access to document object properties is blocked RRS feed

  • Question

  • Hi,
    I am using a timer to check if word document changed by checking the Saved property, this works fine, but when I open the window to insert special character (insert-symbol-more symbols) the timer handler is executed and the access to Saved property of the document object (or any other property) is blocked, the entire application is hanging. I need to find a way to avoid this behavior by detecting when a window is opened to disable the timer or  by finding another way to intercept document changes.

    Regards.
    • Edited by Tunisian_BB Thursday, March 28, 2013 8:40 AM Typing errors
    Thursday, March 28, 2013 8:37 AM

Answers

  • Hi Tunisian_BB,

    Thank you for posting in the MSDN Forum.

    I need to find a way to avoid this behavior by detecting when a window is opened to disable the timer

    For this request, I suggest you post your issue on C# forum.

    or  by finding another way to intercept document changes.

    I cannot think of a way other than checking Document.Saved property. I think you'll need to consider diable the timer.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Tunisian_BB Tuesday, April 9, 2013 10:24 AM
    Tuesday, April 9, 2013 9:29 AM
    Moderator

All replies

  • Hi Tunisian,

    Why not just concentrate on major events such as document save, saveas, print, and close. Surely you can trap the Saved property there?


    Kind Regards, Rich ... http://greatcirclelearning.com

    Thursday, March 28, 2013 11:38 PM
  • Hi Rich,

    In my case I  have a requirement to know when the user make changes and not only when saving or closing document.

    Regards.

    • Edited by Tunisian_BB Friday, March 29, 2013 8:22 AM error
    Friday, March 29, 2013 8:20 AM
  • Hi Tunisian_BB,

    Thank you for posting in the MSDN Forum.

    I need to find a way to avoid this behavior by detecting when a window is opened to disable the timer

    For this request, I suggest you post your issue on C# forum.

    or  by finding another way to intercept document changes.

    I cannot think of a way other than checking Document.Saved property. I think you'll need to consider diable the timer.

    Best regards,


    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Tunisian_BB Tuesday, April 9, 2013 10:24 AM
    Tuesday, April 9, 2013 9:29 AM
    Moderator