Web Add-ins: Async Loops, XML in JS & asyncContext

August 14, 2015

I hope you’ve had a chance to think about the code in the previous post for reading the value of a document property. This post will consider the problem of looping when async calls are involved, using that as the basis for the discussion.


Web Add-ins: Reading Word Document Properties

August 13, 2015

Besides writing to a specified place in a document, the other major thing an “App for Word” can do is communicate with Custom XML Parts. Mainly, I suppose the reason this was included in the original APIs is because Word can link a content control to a node in a Custom XML Part. Changing the […]


Web Add-ins: development resources

August 10, 2015

Here’s another tool where you can try out JavaScript, on-line: JS Fiddle. The link is to the tutorial page, in the documentation. The actual editor is here. Microsoft provides a number of resources, besides the documentation on MSDN, for learning about the Office (2013) APIs.


Web Add-ins: Coercion types in Word

August 4, 2015

In the last four installments, the basics of creating a Web Add-in and reading/inserting information was introduced, using two different data formats: matrix and plain text. When working with Word, especially, formatting can be just as important as text content. For this reason, Word supports more and complexer content types than the other Office applications. […]


Bug Word 2013: COM exception comparing documents

July 29, 2015

I’m breaking the rhythm of the series on Web Add-ins to report a bug that was discovered by a developer in the VSTO forum, this week.


VBA->JS: Named functions (Syntax & Concept)

July 23, 2015

Now that you have an idea of the basic JavaScript syntax it’s time to expand from code snippets to more complex subjects, starting with functions. This topic will extend over a number of posts as it’s not quite as simple as what we know from VBA…


BUG Word 2013: Selection in Word disappears after running code

February 26, 2014

Since the release of Word 2013 we’ve been seeing sporadic complaints in the Word forum from developers that the selection highlighting disappears after their code executes. Only yesterday did someone post steps to reproduce the issue that worked consistently. It turns out that this is, indeed, “unexpected behavior”. Apparently the screen redraw isn’t firing as […]


Word Programmierung Handbuch (4th ed.) is here!

January 24, 2014

A few days late for my seminar, but it’s finally here! Despite Microsoft Press’s break with O’Reilly, leaving authors in the German market in limbo, the 4th edition of the Word Programmierung Handbuch has been printed, bound and is being distributed this week. Many thanks to the publisher for managing to accomodate all the new […]


Trapping events on a repeating section content control

August 21, 2013

[This is the follow-up to a previous post about mapping repeating content controls to a custom XML part.] As a developer, you might want to be notified when the user adds a new set of mapped nodes to a repeating section, or deletes a set. If you look for events for Content Controls to help […]


Repeating section content control in Word 2013

August 20, 2013

Some significant improvements were made to Word’s content controls in Word 2013. You can find an overview here. One interesting capability is a new kind of content control that brings back some of the functionality lost when XML nodes technology had to be pulled from Word due to the court decision in 2009. In the […]


Word 2013: Missing object model documentation

May 2, 2013

I think many of us are still trying to come to terms with the fact that the only Help for Office 2013 is on-line. The official information can be found here: http://technet.microsoft.com/en-us/library/cc178954.aspx in the section AWS (Assistance and Worldwide Services). The official line is that this is “better” all around. Help can now be searched […]


Word 2013: AutoSave and the new property IsInAutoSave

March 17, 2013

In a previous post I wrote about a change in Word’s behavior: Even if the user chooses “Don’t save” when closing a Word document, the DocumentBeforeSave event triggers. We’ve been thinking this is a bug, but it turns out that it’s not – it’s by design.


Word 2013 Bug: “Not available for reading” error on opening a document

February 22, 2013

The more people use Word 2013, the more changes and problems are bubbling to the surface. Again, this one was brought to the world’s attention in the Word for Developers forum. “Reading mode” was introduced a few years ago to provide a more efficient way to read documents on-screen. By default, documents opened from an […]


Word 2013 Bug: DocumentBeforeSave event triggering when user chooses “Don’t save”

February 20, 2013

EDIT: There’s an update to this in a new blog entry. To summarize: this behavior is by design and there is a workaround for the problem. A new bug was reported in the Word for Developers forum this week. I also received an email about the same behavior. Microsoft confirms the behavior but isn’t yet […]


Word 2013: Templates location and File/New

February 6, 2013

When you create a new document in Word, it automatically bases on a template. By default, this will be the built-in Normal.dotm, but it can be any *.dotx or *.dotm file. This document will maintain a link back to the template, enabling it to use Building Blocks, Ribbon customization and macros in the template. Users and […]


Word 2013: Where are the layout options?

February 4, 2013

The way Word lays out a page has changed with almost every version. Depending on what you do, you may like the new or prefer the old. For this reason, and for backwards compatibility, all the accumulated changes have been kept as growing list of “compatibility layout options”. The user can activate/de-activate these for each […]


Bug Word 2010/2013 with Enumeration wdFindAsk

January 3, 2013

As more people migrate away from Word 2003 and 2007 to a newer version, more bugs are starting to come out of the woodwork. Again, this one was brought up in a forum. When a developer writes code to use Word’s built-in Find functionality, it’s usually to do a “Replace all”, or to run a loop […]


Release: Office 2013 idMso & imageMso documentation

December 27, 2012

The following information was supplied by MSFT Nathan O. last week in the Office MSDN forums: “I know the documentation for Office 2013 is still somewhat limited, but hopefully the following link will help. Microsoft Office Document: [MS-CustomUI2] Supporting Documentation – http://www.microsoft.com/en-us/download/details.aspx?id=727 From here, you should be able to download the *.txt files for Word, […]


Why the silence…

December 20, 2012

It’s been over a month since I last wrote an article. Obviously, I’ve been busy… Among other things, we’ve signed a contract for a fourth edition of “Word Programmierung, Das Handbuch” with Microsoft Press, Germany. Word developer books don’t have it easy on the software book market and the German-speaking market is comparatively limited in scope. […]


Word 2013 WordOpenXML incomplete: missing Comments extensions

October 20, 2012

In the initial release of Word 2013 the new Comment extensions, contained in the commentsEx.xml part, are not written to the XML returned to the object model property Range.WordOpenXML.


Context-sensitive Tools in the UI in Word 2013

October 9, 2012

One of the biggest problems with Word has always been command discovery balanced against working efficiently. For the ten plus years spanning Word 6 through Word 2003 there were menus, toolbars for various features, as well as the possibility of creating customized toolbars with the commands you needed most. In addition, the toolbars could be positioned freely […]


Word 2013 and text files as mail merge data sources

October 6, 2012

Once again, a forum question has prompted a topic for my blog. This time, it comes from the discussions about developing for Office 2013. For many years, a main focus of my work with Word has been related to importing and exporting data into and out of Word documents. The built-in functionality for this has […]


How the Backstage affects repurposing using Word 2013 VBA

October 1, 2012

New month, new topic – for the moment, at least. Forums are such a wonderful source of topics to write about… Today’s comes from a question in the Office 2013 Preview for Developers forum on MSDN. In Word 2010 the Backstage was introduced with the purpose of providing management functionality for Office documents. The Backstage […]


Word 2013 Comments and the Open XML SDK 2.5

September 30, 2012

Changes in the Word Open XML for comment’s functionality in Word 2013 were presented in my last post. This time, we’ll look at how these changes affect working with Comments using the Open XML SDK.


Word 2013 Comments in WordOpenXML

September 29, 2012

Now that we’ve looked at Comments in the Word 2013 user interface and object model, it’s time to consider how this has been implemented in WordOpenXML and the Open XML SDK.


Word 2013 Comments in the Object Model

September 26, 2012

In my last post I presented some of the new Comment functionality in the Word UI. The new functionality for Comments is also reflected in Word’s object model.


New Comment Functionality in the Word 2013 UI

September 22, 2012

Creating and Editing Comments When you give the command to insert a new Comment in Word 2013 a small pane appears near the current selection. It gives the name of the person entering the Comment and how long ago the Comment was generated. This information travels with the Comment. You just start typing. The Comment pane […]


Comments and Revisions

September 22, 2012

The Word team has once again invested quite a bit of thought and effort in good old “Track Changes”. A couple of versions back, we got: the Revisions Balloons – the area that appears in the margin where track changes and comments are listed in little boxes with lines back to the text and the […]


Open XML Files, Skydrive and Web apps

September 21, 2012

In the Open XML forum the other day a person was concerned about mail merge main documents they were converting from Word 2003 to Word 2010. The users insert merge fields in these documents that serve as “targets” for writing data into the documents. The software company is updating its tool to use the Open […]


Bug fixed: Formfield Number formatting in templates

September 10, 2012

One of the most frustrating things for Word power users and developers is the accumulation of “bugs” in the product. If a problem is not caught early in the beta stage, it’s often around to stay. When pressed, the product team will often say that changing “expected behavior” will break backwards compatibility. Another reason we hear […]