Word Variables, Properties and Content Controls Editor

Home Up Search This Site What's New? Audio On CDR Favourites Downloadable files Photo Gallery 2002 Photo Gallery 2003 Photo Gallery 2004/5 Photo Gallery 2006/7 Photo Gallery 2008 Photo Gallery 2009/10 Photo Gallery 2011 Photo Gallery 2012 UK Photo Gallery Ireland Photo Gallery Cats Photo Gallery 

horizontal rule

 

Google
 

Many people access the material from this web site daily. Most just take what they want and run. That's OK, provided they are not selling on the material as their own; however if your productivity gains from the material you have used, a donation from the money you have saved, however small, would help to ensure the continued availability of this resource.

Click the appropriate button above to access PayPal.

 

Docvariables, Docproperties, Content Controls and Bookmarks editor add-in for Word 2007/2010

 

Word does not provide a convenient method of examining document variables, which thus tends to limit their usefulness to those who are comfortable with vba programming. Document variables are however extremely useful and can be used to store all manner of information to employ in in a document or macros used with that document.

The following came as a result of a discussion with friend and former Word MVP Greg Maxey about a convenient method of determining the presence and value of any docvariables in the current document, and, like many projects we have started together, it sort of grew into the current offering, which is a tool that not only displays the names and values of any docvariables present, but provides the opportunity to edit their content and insert docvariable fields into the document at the current cursor position to display the stored content.

Subsequently Greg became rather engrossed with document properties, of which there are built-in types that store information about the document, and custom types which are very similar in practice to doc variables.

The current version has been extensively modified from the original (which is still available for reference) to encompass Content Controls.

Some of the built-in document properties are not editable, but their values may be inserted, and some may only be inserted as content controls. The add-in caters for all these factors. Where a function is not available for a given item or document, either the button which controls the function is disabled or the user is presented with an error message. The functions have been designed to be self evident, but there is a link to this page at the bottom of the user interface, where you will find a fuller description.

Extract the template from the ZIP file to your Word startup folder - defined in Word Options > Advanced > File Locations > StartUp, then if Word was running at the time, select it from the Developer toolbar > Templates.

Alternatively restart Word to load the template automatically..

The ZIP file also includes an EXE installer. This will automatically install the add-in to the default Word Startup folder (or can be redirected if you have changed that location) and will remove any previous version from that folder.

Notes:

The add-in contains functions that will not work with 64 bit versions of Office 2010. It will however work with 32 bit versions of Word in Windows 64 bit.

Although the revised (but unpublished until now) release will re-start at Version 1.0, there have been many versions of this add-in along the way and testing has been exhaustive. Development is on-going and will take account of user feedback and the inevitable issues that we have missed. The version numbering will be updated to reflect those changes.

The dialogs shown in the illustrations may vary slightly from the downloadable version. Where significant changes are made, the illustrations will be updated to reflect those changes.

Each new update will have a different version number as part of the file name. Ensure that you remove any previous version before installing the latest.

When the add-in is installed, a new group is added to the Add-Ins tab of the ribbon

and a (removable) button is added to the Links group on the Insert Tab of the ribbon

 

There are four buttons in the group. The large button calls the application. From top to bottom the other buttons are:

1. Options - This toggles the display of a duplicate of the main button in the Links group on the Insert Tab of the ribbon and came from a difference of opinion as to where the button should be located. I felt that it was more logically placed amongst the Insert commands with which it is associated. Greg felt that as it was an add-in it should be on the add-in tab - logic that you can't argue with, even if you prefer it somewhere else. So we both got our wish.

The Options also provide feedback with sound, and the ability to list Content Controls and Bookmarks sorted by their location in the document.

All the options are selected by default,

 

 

2. Info/Help - Links to this web page

3. Disclaimer - See text below. Click anywhere on this dialog to dismiss it.

 

On clicking the main button, the userform will display the 'Lists' tabbed page of the dialog which features various list boxes and an assortment of action buttons. The userform will remain on screen until dismissed and is modeless, which means that you can switch to edit the document without dismissing the form.

Note especially the User Notification and Action Panel on the main page and the User Notification Panel on the subsequent pages. These provide context sensitive help and warning messages to accompany each process.

If one or other docvariables, bookmarks or custom document properties are not present, the associated list box will display a message to that effect. There will however always be built-in document properties present and thus listed.

Create Variables, Custom Properties or Bookmarks

Create a new Variable

Change the value of a variable.

Insert references to existing variables, bookmarks and document properties. References may not be inserted into protected areas of documents.

Create a custom docproperty

Built-in doc properties. Note that the values of some built-in docproperties, such as the 'Company' item displayed, are user editable. Others reflect values created by the document and thus are not editable, though reference may be made to them in the document.

Working with bookmarks.

Protected Forms - This editor is not intended and not recommended to be used to complete Word protected forms, however it can be used to do so, and in particular it adds the ability to add list items to a dropdown form field - even in a password protected form, which cannot be normally achieved from Word while the form is protected. It does not provide the ability to add or delete form fields in a protected form, nor to change their properties. 

Change the value of a dropdown form field or add a new dropdown form field list item. Note that dropdown form fields have a maximum of 25 listed items.

 

Delete Items:  Deletion provides the opportunity to unlink any cross references (retaining their content at the time) or to delete the cross references. In the case of bookmarks, there is also the opportunity to delete the bookmarked content.

 

Content Controls

When running the add-in on a document that contains unmapped content controls, a warning message is presented, providing the options to apply temporary or permanent labels to those controls as shown below.

Creating mapped Content Controls

You don't need to know anything about NameSpace nor change the default in order to use this add-in, but if you want a fuller explanation try the following link : http://en.wikipedia.org/wiki/XML_namespace

Changing the value of a content control

All the available content controls are supported. All work in much the same way as shown above, however on selecting a picture content control and choosing the option to change value a file open dialog focussed initially on the 'My Pictures' folder is opened:

 

Deleting Content Controls: The add-in provides extensive options for deleting content controls from a document, mapped or unmapped, and/or their values.

The deletion page also allows the viewing and/or deletion of the custom XML mapping e.g. in the case of the selected item in the list

'View the XML mapping' opens the section of XML code in Notepad

'Delete Custom XML Map' offers the option to review and delete the mapping

Clicking "Delete by Node" offers the following option to view each item in turn and allows the user to select which (if any) items to delete.

 

  Now Download the add-in

The add-in will also be available from Greg Maxey's web site