For developers

Articles for developers of Word templates and tools, whether you use .NET, VSTO, VB6, VBA, VB Script or another language to address the Word object model

Development

Design Mode in Word 2007 and Word 2010: How to detect it and turn it on and off

Word 2007 and Word 2010 have a 'Design mode' button for editing content controls. .FormsDesign and .ToggleFormsDesign detect or toggle Design mode.

How to create a ribbon button to show the Signatures pane in Word

The FileViewDigitalSignatures command in Word is broken. But you can work around this by creating a custom button on the ribbon to display the Signatures task pane directly.

How to detect whether a Word COM Add-in is connected and, if not, load it

Word's object model provides a COMAddIns collection of COMAddIn objects. In theory, the .Connect property of a COMAddIn object should tell you whether the add-in is connected and/or allow you to load it. In practice, not so.

Selecting or referring to a page in the Word object model

It's common to feel that you need to cycle through all the pages in a Word document and perform some processing on each page. This article discusses why it's not possible for developers to refer to a printed page using the Word object model, and some workarounds.

Word VBA resources

A list of tools, add-ins, websites and books for Word developers. Most apply whether you are using VBA, .NET or other languages to access the Word object model.

Word.Application.Options.LabelSmartTags doesn’t work in Word 2010. But there is a workaround.

In Word 2010, Smart Tags are re-named as Actions, and are deprecated. The user can still turn on the recognition of Actions but we can no longer read or write the corresponding option in the object model. This article proposeds a workaround.

Formatting

Border basics for developers

What borders are available for which style types? How can I format line style, weight and colour of borders?

Layout

Page (that is, section) borders

How to control page borders (which are actually section borders).

Managing Word

Asking questions, getting help

4 ways to get free information about how to use Word.

What version of Word do I have?

Start up Microsoft Word. Compare these pictures to Word running on your computer to find out what version of Word you have.

Styles

4 ways to control page breaks within tables and table styles (for developers)

For developers: How to prevent a whole table, or just one or more rows, from breaking across a page. The Microsoft Word object model has 4 ways to manage, or prevent, tables from breaking across a page. Some of them work.

Background and foreground: Shading in paragraph styles

For developers: The background colour in a paragraph style is controlled through the Shading object. It manages background and foreground colour and texture. The Word object model is straight-forward, but you need to choose the right texture as well as the background and foreground colours.

Borders in character and paragraph styles

How to control borders in Character and Paragraph styles. Includes bugs, annoyances and limitations.

Borders in table styles

What borders are available for table styles, how to control them, and how to avoid the bugs and inconsistencies in the Word object model.

How to detect frames in paragraph styles

In the user interface, it is obvious if a paragraph style has a frame. It's not so obvious in the Word object model. There is no built-in method to determine whether a style has a Frame. This article identifies one possible way around this problem.

Shading (ie background colour) in table styles

For developers: how to set the background colour in a table style using the Microsoft Word object model. There are 7 ways to set shading (ie background or foreground colour) on elements of a table style in Microsoft Word. Most don't work. This article describes what does seem to work, and identifies the bugs and annoyances in setting shading in table styles.

Templates

Front cover images in Microsoft Word report templates

In a Microsoft Word template for a business report we often need a front cover with a big image and text overlaying the image. How to do it and traps to avoid.

How to save a Word document as a template

If you save a Word document as a template, your template will start life with all the accumulated baggage and garbage that the document had acquired. Here is how to create a pristine, clean, new Word template in Word 2007 or Word 2010.