Tribal Knowledge: Working with Office Interops

(Updated 11/22/2011 removed yellow font color)

Most people when working in C# or VB.Net using the VSTO package confuse a VSTO problem with an Interop problem. They are actually quite different. Most of the problems a developer will encounter are actually interops problems with the document they are working on. The problem with the interops is that the documentation of them is sparse and sometimes incomplete. But there is a way to get free fast examples of interop usage and this is the Tribal Knowledge of working with interops:

One way to divine the inner workings of any office document and how to manage it via the interops is to record a macro of the process needed. Once done examine the vba code, it will show settings changes and other items of interest that can lead the way through the tribal knowledge of the interops. Most the object calls are the same under the covers…

If that fails try posting a question to the Microsoft interop groups such as Discussions in Office Development or Discussions in Automation.



  1. Orhan Metin says:

    That’s the best advice to anyone working with Office Interop.
    Just perform the operation on the Word and observe the generated macro. The code there is probably what you need.

    It works for me like a charm. Thanksa lot.

  2. The forum links have died of bit-rot, as Microsoft does like to change things up every couple of years….

    I did find forums for Office Development, though.

Leave a Reply to Orhan Metin