“You are not allowed to edit this selection because it is protected.” but only since Office 2013?

后端 未结 8 1626
我寻月下人不归
我寻月下人不归 2021-02-19 20:07

We\'ve had these few lines of code running happily in our applications for several years (and in several versions of Office, 2003, 2007, 2010 etc). Purpose is to perform a kind

8条回答
  •  难免孤独
    2021-02-19 20:54

    For me, the issue was similar to Tim Dols answer, but I needed to unlock the content of the content control., which is the LockContents property: mycontentcontrol.LockContents = False

    For @CrazyIvan1974, the problem with that solution is that Add creates a new document. if you point at an existing document when using Add, it doesn't load the document, it creates a new document using the original as a template. That can disconnect templates and add-ins, really messing you up if you save over the original

提交回复
热议问题