Browse by Tags

VSTO Addins break after Visual Studio 2010 SP1 install, can't find config file
Published 11 April 11 5:36 PM | Blog
I ran into a breaking change with Visual Studio 2010 SP1 and VSTO at a client today. It seems there was a change that caused Office addins to look for their config files in the application’s folder instead of from the addin’s folder (e.g. Word.exe.config or Excel.exe.config). The result is all sorts of chaos with AppSettings, WCF service bindings and anything else that needs to be read from the app.config The details are posted here on connect - Visual Studio SP1 (or specifically VSTO...
VSTO Tip - Show Errors from your Add-In
Published 22 November 10 2:15 PM | Blog
By default, Microsoft have chosen to hide user interface errors for Office add-ins. That means whenever an unhandled exception occurs, you are none the wiser if you’re not debugging. There are two solutions to this: Implement an exception handler (like LadyLog ) Show the errors by changing the end user options Read More...
Filed under: ,
VSTO Tip - Stop the built in Ribbon reflection from slowing your add-in's load time
Published 22 November 10 12:10 PM | Blog
Behind the scenes, when a VSTO addin or customization loads, the runtime uses reflection to search for all Ribbon controls and customizations and automatically adds them to the appropriate extension regions. This process makes it easy for developers as they don’t have to worry about hooking up the Ribbon Tab that they’ve developed to the Ribbon, or add a new menu item to the Office Menu. However, it can make the add-in’s startup time slower if your Office solution has many references...
Filed under: ,
VSTO - Error when adding items to ComboBox
Published 22 November 10 11:41 AM | Blog
Ran into this issue when designing a Ribbon (Visual Designer) control that contained a ComboBox. After you add items to the ComboBox using the properties window, everything appears fine until you attempt to Save or Build. You will get the following error: Code generation for property ‘Items’ failed. Error was: ‘Object reference not set to an instance of an object’ Read More...
Filed under: ,
Sharing a custom Office Ribbon between different VSTO projects
Published 9 April 10 5:33 PM | Blog
I have been working on Office Integration over the last few months, and what started off as a Word 2007 add-in has now also expanded to PowerPoint and Excel. I refactored the code and pulled the existing Ribbon into a shared class library for the different VSTO projects to use. Read More...
Why is programming for Word so different from Excel and PowerPoint?
Published 9 April 10 5:31 PM | Blog
Working on an Add-in that supports Microsoft Office’s Word, Excel and PowerPoint. One would think that being all three products being Office applications that programming against them would be nice and simple. How wrong I could be… (Note: Using C# doesn’t help either :P) Read More...