Word 2010 Add-In that could prevent word from closing based on certain conditions

Add-in Express™ Support Service
That's what is more important than anything else

Word 2010 Add-In that could prevent word from closing based on certain conditions
Word 2010 Add-In 
Karthick Sethu

Posts: 1
Joined: 2011-04-20
:cry: I am having a word 2010 document which has a Document Information Panel coming up when the document is opened from SharePoint. I am looking to write an add-in which a) could ensure the DIP validations are all fine and b) if not, prevent the word document from closing. c) Also prevent the document from being saved into any local folder - i.e, the document should be saved only into a SharePoint document library. Would all this be possible with your add-in? if then, I would be buying them immediately.
Posted 20 Apr, 2011 14:47:25 Top
Eugene Astafiev

Add-in Express team

Posts: 8540
Joined: 2007-07-25
Hi Karthick,

Thank you for your interest in our products.

Please use the Word Object Model to get the properties shown on the Document Information Panel. To get assistance with host applications’ objects, their properties, and methods as well as help info, use the Object Browser. Go to the VBA environment (in the host application, choose menu Tools | Macro | Visual Basic Editor or just press {Alt+F11}), press {F2}, select the host application in the topmost combo and/or specify a search string in the search combo. Select a class /property /method and press {F1} to get the help topic that relates to the object. Also you may be interested in the Set Word Document Properties Programmatically article in the MSDN magazine.

Please use the DocumentBeforeClose event of the ADXWordAppEvents component to cancel the process of closing a document. For example:

private void adxWordEvents_DocumentBeforeClose(object sender, ADXHostBeforeActionEventArgs e)
    e.Cancel = true;
.NET, Extended MAPI, Windows Phone & RT
Posted 21 Apr, 2011 07:35:32 Top