Copy formatted content from a Visual Studio RichTextBox to Word

June 30, 2018

One question I’ve seen fairly regularly is, “How do I copy formatted content from a Visual Studio RichTextBox to a Word document?”

The answer, of course, is, “Use the clipboard.” But behind that is another question: How to put the content in the Clipboard? Read the rest of this entry »

If your VSTO solution crashes after running for a while…

February 23, 2018

…and the problem isn’t reproducible.

I was confronted with a request to trouble-shoot such a situation, not long ago. A large organization contacted me and this was the problem description. Read the rest of this entry »

Provide feedback about Office to Microsoft

November 5, 2015

Microsoft has a new way to collect product feedback: UserVoice.

For as long as I can remember, it’s seldom been possible to provide feedback about Office to Microsoft. There has been the occasional conduit, hidden away, but on the whole it’s been like throwing spit balls at a brick wall…

This has changed for developers. For how long no one knows, but take advantage of it while it lasts! You can post an idea and link to it so that like-minded folks can up-vote it in order to give it more weight:

Office Developer portal

The Microsoft folks are reading and evaluating these, so take care to provide a clear, logical presentation, with example scenarios as to why the point is important.

Web Add-ins: Analyzing the “Hello World” JavaScript

July 30, 2015

I hope you’re not feeling too intimidated and have been able to create and load the “Hello World” sample

This post takes a closer look at the JavaScript part of the sample. The discussion is in two parts: First, how JavaScript is linked into the HTML page; then, the JavaScript code with the main focus on the Office JS API. Read the rest of this entry »

VBA->JS: Conditionals, Loops & Operators 4 (Syntax)

July 21, 2015

In this last post on conditionals and loops I’ll present Arrays and how to loop using the last kind not yet discussed: “For Each”. Read the rest of this entry »

Ribbon / Office Fluent UI: Links to information

February 8, 2014

Until the release of Office 2013 and all the new information and hype about the “Apps for Office” developer interfaces, there was a useful page on MSDN that collected links to all relevant information concerning developing for the Ribbon and Backstage (, also known as the “Office Fluent UI”.

For a number of months you could still find the link, but it was redirected to a page about the new technology, containing no information whatsoever about the Ribbon. Recently, the old page doesn’t show up any more in internet searches, so only those of us with old “Favorites” or bookmarks to the link collection get to enjoy this frustration. But this is no help at all to the developer unfamiliar with what documentation is available nor any idea where to search for it.

In my work as forum moderator I constantly need to refer to, and refer people to, Ribbon documentation. So I’ve collected all the useful links from that page and posted them in the General Office Developer forum here.

I’ve tried to remove any links that are no longer active, but I may have missed some. So if anyone comes across a problem in that listing, please leave a comment here, or in the forum.

(And I also apologize for the lousy formatting of the post. The forum software doesn’t “like” it and refuses to use the correct spacing and bold formatting )

Word: Difficulty processing fields in the footer during printing

February 7, 2014

Once again, a forum discussion has brought to light something new and useful to know when working professionally with Word.

When someone asks how to display different content in the footer for the last page, only, the recommended approach since time immemorial is to use an IF field. The If field tests whether the current page number is also the last page number. When that’s the case, different content is displayed. Basic instructions on how to set this up can be found on the Word MVPs FAQ site. It’s not always simple to set up, but it works.

Except in this case, it didn’t… Read the rest of this entry »

The Open XML Package Editor in VS 2012/2013

January 31, 2014

As more and more developers migrate to Visual Studio 2012 and/or Visual Studio 2013, we’re seeing requests in the Open XML SDK forum for a version of the Open XML Package Editor that works with these new versions of Visual Studio.

(The Open XML Package Editor lets you view the structures and XML content in an Office Open XML zip package and edit it, something the Open XML SDK Productivity Tool does not support.)

Unfortunately, at the time of this writing, Microsoft has not updated the tool – originally written for Visual Studio 2010 – nor released a new version. Luckily for all of us, a resourceful colleage of mine who attended my seminar in LucerneDr. Eckehard Pfeifer – did some research that he said I might share :-) Read the rest of this entry »

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 material without needing to throw out as much of the existing as we feared would be necessary. Instead of just over 1000 pages, the 4th edition has 1145, more than 250 completely new! Read the rest of this entry »

Office Trainertage 2014 in Lucerne

January 23, 2014

I just spent a couple of interesting days at the Office Trainertage (training for Office trainers) in Lucerne, Switzerland, hosted by Kuhn Informatik AG. I’d heard about this event, but never had the opportunity to experience it. Read the rest of this entry »

Content Controls and language formatting

January 11, 2014

Long-time Word users, especially those who work on professional documentation in multilingual environments, know that you have to be very careful that the language default in Word matches the default language setting in Windows. If it doesn’t, the Windows language will override the Word language as direct formatting in the document. Documents created in such an environment are difficult to get under control – it’s almost impossible to clean out the imposed Windows language without delving into the Open XML file format. Read the rest of this entry »

Open XML SDK: Does the runtime version matter? YES!

January 8, 2014

There was a discussion in the Open XML SDK forum today that I found interesting. Certain namespaces for Office 2010 weren’t being recognized with a reference to the Open XML SDK version 2.0, even though they should have been. The references were being picked up just fine with a reference to the newer Open XML SDK 2.5, however.

When I tested I had no problems using the namespaces. Luckily, I thought to include the version number of the Open XML SDK runtime in my reply. Turns out that Microsoft replaced the original download with a newer version without any public notification, either about the fact that it was being done or mention about problems with the older version. When the OP downloaded the newer version, the problem disappeared!

So if you need to use the older version of the Open XML SDK and are having problems with any namespaces that belong to DocumentFormat.OpenXml.Office2010.Word.DrawingShape, try uninstalling, downloading a newer version and re-installing. You need a version that starts with v2.0.5###; the problem was ocurring in v2.0.4###.

Downloadable Office 2013 VBA Help files

October 11, 2013

One of the major changes for Office VBA Developers in version 2013 was the removal of on-board help files. If you couldn’t connect to the internet, up until now you had no access to any object model Help.

The Office team heard the complaints and has invested resources in packaging the MSDN VBA Language Reference for Office 2013 in a set of downloadable Help (.chm) files, available from the download site:

Note, please, that these do not hook up to context-sensitive F1 Help; that can access only the on-line version. Also, there will be no automatic update of these files and there’s no way to know if they’ll ever be updated. So in order to view the most current version or provide feedback you still need to use the Internet resource.

But, if you’re travelling or have a slow connection, this at least provides an option for viewing the basic 2013 object model information.

The Future of Office Programming: Update

July 20, 2013

On January 10 2013 I blogged about what I think the future of Office programming technologies would be.

On June 18 2013 Microsoft blogged on this topic under the title “Roadmap for Apps for Office, VSTO, and VBA”. The content basically confirms that all three existing technologies (Open XML is not mentioned) will continue to be supported for the foreseeable future. It also briefly describes what the scenarios, pros and cons of the three are.

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:
in the section AWS (Assistance and Worldwide Services).

The official line is that this is “better” all around. Help can now be searched on-line and translated. Of course, the fact that this was already the case for almost ten years isn’t mentioned…

Truth be told, the real reason is resources (financial). If Help has to be delivered with the product, then it has to be written before the product is released. This means lots of man-hours just prior to release, then down-time until the next product release. So, to a certain degree, the decision is understandable.

The other side of the coin, however, is that there’s no deadline that forces the documentation to actually be done and finished.

The result at the time of this writing, some months after the official release of Office 2013, is that the object model language reference (Help) hasn’t been reviewed for relevance to Office 2013, and new functionality isn’t fully incorporated. So you can spend literally hours trying to find information in the new, less friendly MSDN interface with the result that
you can’t find what you were looking for because it’s simply not there.

The “final straw” for me was a question about the Word object model in the Word for Developers forum the other day. So I’ve set up a new “page” on this blog to document un-documented behavior and information concerning Office. Everyone is welcome to contribute!

The future of Office programming

January 10, 2013

UPDATE 20-JUL-2013: Microsoft has provided a “Roadmap” for the various technologies for developing with Office applications. In a nutshell, it states that all three current technologies will continue to be supported for the foreseeable future:

With the introduction of the new “Apps for Office” in Office 2013 a lot of people are asking about the future of Office programming. Is VBA going to be discarded? How about VSTO and the COM Add-in technology, generally? Will everyone have to learn Java script in order to do anything with Office? Read the rest of this entry »

Release of the ECMA-376 Standard 4th edition

December 26, 2012

While trying to find the namespace for an Office 2013 Ribbon I checked the ECMA pages today and discovered that the 4th edition of the ECMA-376 standard has been released this month.

It can be downloaded in four parts at

Not yet updated are the special Office Implementation Extension standards for things like the Ribbon and Toolbars. Let’s hope, now that the ECMA-Standard is public, that these will soon follow!

MSDN Library Views – Why do away with Classic?

December 24, 2012

Since a few days ago, we’re being informed that MSDN is going to discontinue the “classic view” and support only the “lightweight view” for its library. This promises to be a disaster, and you have to wonder what kind of data the Powers That Be are looking at to make this kind of decision. If you want to protest, post here. Read the rest of this entry »

PowerPoint 2013: Change in default save type

December 21, 2012

Mostly, I work with Word and that’s what this blog is usually about. But I do program inter-Office with Excel, PowerPoint and Access, when the need arises. Of those, PowerPoint is my least favorite – I find the object model impenetrable and always have to ask questions of my colleagues in the PowerPoint forum

One of the projects that’s kept me busy the last few weeks is a VSTO add-in for PowerPoint. Simply formulated, it’s a tool to assist in drawing diagrams for Western trail patterns. I want it to work in versions 2007, 2010 and 2013, which it does, with a notable exception in 2013. Read the rest of this entry »

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. So we’re very proud that our work is still selling well enough after almost ten years to warrant a fourth edition. Read the rest of this entry »

Programming Language Equivalents

September 20, 2012

As I was gearing up to present a series of posts on programmatically incorporating Excel charts in Word, I realized that including multiple programming language versions in a blog post just isn’t the thing to do. My blog posts tend to be long enough as it is :-)

So I’ve started a new section of “pages” that you can access through the menu point “Equivalents” at the top of the blog. The idea is to enable people who understand either VB or C# to be able to follow code examples in the other language and be able to use the principles in their own code.

There’s potentially a lot of material to cover under the topic “Equivalents”, so I’ll be adding to it as I go along. If you have any particular pain point you’ve encountered while trying to work with “unreadable” code samples, leave a comment on the Equivalents page and I’ll try to include that topic… soon :-)

Pizza Delivery is Passé

September 19, 2012

I remember the days when we used to phone for pizza to be delivered. It was a big deal; a special event. Couldn’t happen often enough. Read the rest of this entry »

Where to find information

September 7, 2012

The Office applications are powerful tools created for a specific purpose, such as word processing or performing a large number of complex calculations. Even so, people expect them to be able to do “everything”. Since Microsoft wants us to buy Office and not use other word processing, spreadsheet, presentation or e-mail software, it has historically tried to meet as many expectations as possible (not always with great success).

As a result, the user interfaces and the object models tend to be large and complex, especially Word’s.

Even though Office is sold as a “suite”, all the core applications originated separately, most during the early 1990s. Internally the applications follow different philosophies, as best met the needs of the users when the feature was designed. This is also reflected in the programming interfaces (“object models” or “APIs”, depending on what programming background you come from). Word, Excel and PowerPoint tend to do the same thing differently, which can be confusing for developers coming from outside Office. In more recent versions, Microsoft has tried to provide common interfaces for things such as opening, saving and printing documents. As a result some applications have lost functionality while others have gained – the changes causing confusion for end-users and experienced Office developers.

What’s more, the way these object models are constructed bases to a large extent on how the user works with the Office application. For a developer with no end-user background, the logic behind many parts of the object models is baffling.

Given all these factors, finding information to achieve a goal or solve a problem can be challenging.  It’s important to know where to go for information and to ask questions – one-stop shopping isn’t an option.

Having experienced “the pain”, I decided to add a Link page to this blog site with links to the forums and web sites I consult most frequently when developing and assisting people on the MSDN forums. May it help you accomplish your goals more quickly :-)

Cindy Meister Office Developer MVP

Hello Word afficianados!

September 5, 2012

Word has a long and colourful history. I’ve been working with it for over twenty years, and have the grey hairs to prove it :-)! Each new version brings change. Depending on your point of view, some good, some less so. With a few notable exceptions, those changes remain with us for many versions to come. One of the first things the seasoned user looks for is “What’s new” information.

I’m no exception to that rule. While exploring Word 2013 I’m encountering differences and trying to determine how they’ll affect my life, both as an end-user and as a developer. With so many years’ information stored in my brain, spanning ten versions of the application, I’m finding it increasingly difficult to remember “what belongs where”. So I started recording my findings.

Soon it occurred to me that others might be interested in this information. Therefore, I’m venturing on my first experience in blogging, rather than maintaining a website.

As time goes on, the content of this blog may well branch out and cover topics of interest I encounter in my work as forum moderator on MSDN. If you have any questions about developing with Word, please ask them on MSDN, not in comments on this blog. You’ll find me – and other helpful souls – in the VSTO, the Word for Developers, the General Office Development and the Open XML SDK forums.

Enjoy working with Word and the other Office applications!

— Cindy Meister, Office Developer MVP