VB6 based add-ins may fail to work in Office 2013

VB6 based add-ins have a dependency on the Add-In Designer Object Library (msaddndr.dll), which is no longer shipped with Office 2013 (http://technet.microsoft.com/en-us/library/cc178954.aspx see under OSF section). If the add-in setup project did not include this DLL, then the Add-in registration would fail. To resolve this issue :- 1. The add-in developer can include the msaddndr.dll file…


Considerations for using Dsofile on 64 bit OS

This post is by Yeshwanth Channaraj. There is a well-documented sample program, DSOFile, that enables reading and writing Office document properties (both old format files like *.xls, *.doc and *.ppt, as well as the new open xml formats like *.xlsx, *.docx and *.pptx). The DSOFile sample is compiled as 32 bit. If you are using…


Troubleshooting common VSTO issues – Part 2

In this blog post we will talk about some common errors related to VSTO 3.0 and 4.0. For VSTO 2.0 related issues you can check out the blog post Troubleshooting common vsto issues part 1. Common Error 1: Customization fails to load while opening a customized document targeting VSTO 3.0/4.0 from a network location with…


Troubleshooting common VSTO issues – Part 1

This blog post talks about the common issues related to the VSTO customization failure errors and their possible solutions. Both document as well as application level customizations will be covered here. For the sake of clarity, this blog post is divided into two parts – In first part we will include the VSTO 2.0 common…


You may encounter multiple errors while performing large number of object model calls from a VSTO 3.0 Excel add-in

Suppose you have a VSTO 3.0 add-in for Excel, which performs some Excel object model calls. You notice that it works fine with less number of object model calls but starts failing when the number of object model calls is huge. Eg. You may be iterating/writing through large number of rows(around 1000) in your Workbook….


ArgumentOutOfRange exception when using WPF controls in a Project 2010 add-in.

You may see “ArgumentOutOfRange” exception for no apparent reason when using WPF controls in Microsoft Project 2010 add-in. Specifically, you will see exception with a call stack similar to below :- System.ArgumentOutOfRangeException: The parameter value must be between ‘0’ and ‘3579139.40666667’.Parameter name: paragraphWidth   at MS.Internal.TextFormatting.TextFormatterImp.VerifyTextFormattingArguments(TextSource textSource, Int32 firstCharIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextRunCache textRunCache)   at MS.Internal.TextFormatting.TextFormatterImp.PrepareFormatSettings(TextSource textSource,…


How to set duplex printing for Microsoft Word Automation clients in C#, VB.Net

Microsoft Word Automation clients cannot set the duplex print flag before a print job starts in Microsoft Office Word. Although a parameter in the PrintOut method indicates that there is support for duplex printing, the parameter does not provide true duplex printing. To work around this limitation on Microsoft Windows systems, you must change the duplex…


Resolving performance issues with loading Office add-ins (VSTO add-ins or Shared add-ins)

Many Office developers report performance issues with loading Office add-ins (VSTO add-ins or Shared add-ins) but most of the time delay is due to external factors. This blog post tries to list possible reasons for delay in add-in load.  1).Net Cold Start  – There could be some delay due to time taken to load the assemblies/dependencies…


Presentation.Saved property in PowerPoint returns false for a new, un-modified presentation

Suppose you are developing a PowerPoint add-in and want to use the PresentationCloseEvent to present users with a custom dialog to save the presentation only if the new presentation contains valid changes to be saved. Here is a code snippet from one such C# add-in to explain the scenario programmatically (for the programming geeks )…