How COM works & How to build a COM visible DLL in C#.Net, call it from VBA and select the proper ClassInterface (AutoDispatch, AutoDual) [part1/2]

  This article is split across two blog posts and this is part #1.. use this link (please be patient :), I am still working on part 2) to go to part #2. When a beginner programmer needs to create a COM visible DLL which will be called from VBA, PowerShell, VBScript or .NET applications, he can find lots of tutorials on how to…

2

VSTO – How to build a setup project which targets x64 bit OS, and add custom Registry Launch Condition that checks if a key is found in the native 64bit registry hive.

A developer that needs to learn all about building and deploying a VSTO 2010 installer project, should carefully review this very nice article: http://msdn.microsoft.com/en-us/library/ff937654.aspx (Deploying a Visual Studio 2010 Tools for Office Solution Using Windows Installer). Starting from the 2010 version, Office applications come in two flavors: x32 bit and x64 bit. If you need to take advantage of the x64 bit…

2

VSTO – .Net code throws ‘System.AccessViolationException’ error when automating the ‘Find’ object in Word (KB 292744 BUG: Automation client receives an error message or crashes when the client calls the Find object in Word)

Sometimes users are running versions of Office which are not fully up-to-date. This might be due to the fact that their local IT department has not tested the new patches and did not approve their company wide distribution, or because the machine is not connected tothe Internet and needs to be manually updated .. or some other reason. At the same…

1

VSTO & VBA – How to troubleshoot Excel memory and performance problems caused by inefficient code loops

When working with Excel, a developer sometimes has to search, read or write some cell values and these operations are usually done inside repetitive loop structures. Everything seems to work fast enough for small input files, but once we scale up the design, things can complicate and the end-user experience is severely affected. On the other hand, the developer takes…

5

How to troubleshoot the error message: "The following Microsoft Office solution cannot be installed due to a general installer error: <add-in name>.vsto. 0x80131604" when trying to install a VSTO 2010 Add-in.

      Suppose you develop a simple VSTO Add-in using Visual Studio 2010 and you target the .Net Framework 4.0. When you finish setting up the application’s basic functionalities, you want to test if it runs. Here is a very basic Excel add-in, that should load without any issues: ThisAddIn.cs———————————————————————- using System; using System.Collections.Generic; using…

1