none
Error: This method or property is not available because the current selection is locked for format changes. RRS feed

  • Question

  • Hi,

    I use code in vsto for Word Office 2010 and I get error during command below. Could you help me how to solve the problem and what it's reason of that?

    wordApp.ActiveWindow.ActivePane.View.SeekView = Word.WdSeekView.wdSeekMainDocument;

    Error: This method or property is not available because the current selection is locked for format changes.

    Details:  at Microsoft.Office.Interop.Word.Borders.set_Enable(Int32 prop)

    Regards

    Tommy

    Tuesday, November 19, 2013 12:32 PM

All replies

  • Hi Tommy

    It's not possible to give a firm and fast answer based on the information we have.

    According to the error message, some kind of document protection is activated? Is this document protected in any way? Or has the formatting been restricted?

    What is your code trying to do in the document, at this point, in broader terms?


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, November 19, 2013 3:43 PM
    Moderator