Monday, July 28, 2008

Word 2007 Tip of the Day: Re-Enable Your AddIn

Sometimes Word will disable AddIns. You'll be looking for a Custom Task Pane you've installed, or maybe some Ribbon customization, and the AddIn will seem to have just disappeared. Why does Word do this? Oh, it could be one of many reasons: You may install an AddIn that has the same namespace as another you've already installed, or maybe you monkeyed with the XML in a .docx and Word choked on your edits when it tried to open the document. For whatever reason, when Word experiences a conflict with AddIns or XML within documents, it will disable AddIns and focus on recovering the document.

You don't have to re-install the AddIn. Just go re-enable it.

Tip #3: Re-Enable your AddIn

1) Goto The Button


2)Click Word Options


3)Select AddIns in the left Pane of the "Word Options" dialog.


4) Select COM Add-ins in the dropdown next to "Manage" at the bottom of the "Word Options" dialog, and click "Go...".


5)Check the checkbox next to the AddIn you want to enable and then click "OK".


Most of the time, this re-enables our AddIn successfully until the next time we hammer Word with an AddIn or document it doesn't like.

If the AddIn fails to enable, Word may provide a reason as to why it can't re-enable the AddIn. This may, or may not, be helpful. Or, the AddIn may just fail silently and fail to enable. Most of the time I'm able to re-enable an AddIn without issue, but there's something else we can do to help us identify issues when enabling AddIns. That's a tip for tomorrow though.

Sunday, July 27, 2008

Word 2007 Tip of the Day: Document Properties

You can add document properties to Word docs. If you want to do this regularly, you can just add an icon to the Quick Access Toolbar that will display the Document Properties form for you.

Tip #2: Add Document Properties to the Quick Access Toolbar

1) Next to The Button

is an area called the Quick Access Toolbar, in it you'll see icons for saving, redo, and undo.

Click the down arrow on the right side of the QAT.

2) Select "More Commands" from the menu.


The Word Options dialog appears, and it's opened to the Customize tab.

3) Under "Choose Commands From" above the left pane, select "All Commands".
4) Scroll down the left pane and select "Properties".
5) Click the Add button in the center of the panes.

In the right pane, you'll see the icon for Document Properties, added to the already existing icons in the QAT.

6) Click the OK button on the lower right.
7) Now click the Document Properties icon to display the default properties form for Word documents.


You can enter data into this form that will be saved as metadata in a piece named /docProps/core.xml within the .docx package.

Saturday, July 26, 2008

Word 2007 Tip of the Day: Enable the Developer Tab

OK peeps, as notes to myself, and to help others who frequently ask, I'm going to try and just post a Word tip of the day on a regular basis. (Not every day, let's not get carried away now.) If we're dealing with something genuinely cool, maybe we'll even give it a Tip of the Hat, and if it sucks, a Wag of the Finger. To Start:

Tip #1: Enable the Developer Tab

1) Goto The Button



2)Click Word Options



3)Check the box: Show Developer Tab in the Ribbon



4) Click OK, and Boo-Yaa!



Goto the Developer Tab and Enjoy!

The plan is to use this space to capture interaction with Word documents through the Word 2007 UI as well as to provide C# and XQuery examples of how to manipulate these docs on the Server or in an AddIn.