VSTO ShapeRange Error

I doubt anyone will ever experience this but perhaps my solution might help someone who happens to fall into the same pit of COM-debugging hell as I have. I´ve got some tests where I use Word Automation to start an application and modify some documents. The documents...

VSTO to VBA and Back Again

In this post I´m going to quickly describe a method to call a VBA 6 macro in a Word document from your VSTO add-in and the opposite, calling a method in your VSTO from a Word macro. The method for the latter was supplied in this post for which I can´t take any credit...

XBAP Security Error

I just recently learned that you can distribute WPF-application web-wise using something called XBAP. You create a project in Visual Studio named WPF Browser Application and you´re on the road. However, there are a couple of things to take in consideration. By default...

VSTO-project Office target version

When developing a VSTO-project you will probably sooner or later run into a case where you need to debug the project in two different versions of Office. One solution is to trigger the start of Word using a debug-setting in the project file: Update 18/8 2014:To...

Unique names for test output files

We´d like to unit test everything but sometimes that´s just not enough. Especially when working with third-party libraries which output files of some kind and we need to verify the result. We could use something like this to get a unique name for our temporary test...

Copy pure text from WPF DocumentViewer XPS

I (as previously mentioned) use the WPF DocumentViewer for previewing word documents as XPSs. Howerver, as curious users are often more curious then they should be I´ve found that some users wish to copy text from the XPS directly to Word. This gives us some amount of...