Please let me know, if its possible to disable the built-in Task panes in Office 2007, the 'Restrict Formatting and Editing' [Word.WdTaskPanes.wdTaskPaneDocumentProtection] in particular.
I have displayed a protected document to the user (WdProtectionType.wdAllowOnlyReading), through my add-in, however when the users tries to type inside the document and the 'Restrict Formatting and Editing' taskpane is getting displayed. Kindly let me know, if this can be prevented.
I know of no way to do this from within the object model. It's possible, I suppose, that there's a configuration setting (Registry key); if there is, that would be in the Office Resource Kit.
Beyond that, I think you'd need to resort to the Windows API. There should be some kind of event firing at that level that would let you know when a new window is being displayed in Word. You should be able to identify whether it's this particular task pane and then close it?
FWIW, if I close the task pane the next time I click in a protected document it doesn't appear again. It makes some sense that this is displayed to the user as it informs him why he can't work in the document and gives him the possibility to navigate to a range where editing is allowed.
Another thing you could look into would be to use Word 2007 Content Controls. You can put text in a content control then lock it for editing. This kind of lock does not trigger the task pane.Cindy Meister, VSTO/Word MVP
Marked as answer byTim LiMonday, April 06, 2009 6:09 AM