Setting a Range of Cells in One Call

A reader writes:   I’ve enjoyed reading your online blog about Excel/Dotnet integration. I have a question, that if anyone would know the answer to, hopefully you do.   Is there any trick that can be used to speed up insertion of large blocks of data into a worksheet from dotnet? For example, I may…


VSTO Security Model Principles

VSTO takes a very strong stance on security to prevent the spread of macro viruses or worms.  VSTO’s security model involves the trust of two things: 1) the assembly associated with the document must be trusted and 2) the location the document is coming from must be trusted.   VSTO’s default security model for assemblies is…


Want to work on VSTO technologies?

Visual Studio Tools for Office is really taking off and the team that creates VSTO is growing fast. If you are interested in working at Microsoft and helping us build tools to help developers build customizations for Office, please check out this list of openings on the VSTO team:  There are test, developer, and…


Awesome Videos Illustrating VSTO’s Data Binding Features

Kathleen has just posted two new videos showing how VSTO’s Data Binding Features work.  I guarantee you’ll be wowed by these videos.  The first shows the creation of a databound list and controls in Excel created by simply dragging and dropping.  The second shows how to create databound bookmarks in a Word document.  They are…


Some new VSTO resources

If you haven’t checked it out yet, Chris Kunicki has created a VSTO Zone at his site that has a bunch of useful information about VSTO: Also, Kathleen has posted some more VSTO video tutorials: Demo 5–How to Resize Excel ControlsDemo 6 – How to Add Controls to the Actions PaneDemo 7 – How…


Working with Word Collections and using get_Item

Items in a Word collection are accessed in two different ways depending on whether the index into the collection is strongly typed or weakly typed.  In the case of the KeyBindings collection for example, the index is strongly typed as an integer.  As such, you can use the index operation ([]) to get to an…


Writing user defined functions for Excel in .NET

I’ve updated this article with some new guidance–for the details, see this post.  Excel enables the creation of user defined functions that can be used in Excel formulas.  A developer must create a special kind of DLL called an XLL.  Excel also allows you to write custom functions in VBA that can be used in…


When foreach in Excel goes wrong

This seems like a reasonable piece of code: For Each oCell As Excel.Range In Me.Range(“a1:b5”)  oCell.Value = “test”Next so does this: foreach Excel.CustomProperty prop in worksheet.CustomProperties{  Console.WriteLine(prop.Name);} Unfortunately, when you run this code you will get a “Missing member” exception.  Some collections in Excel can’t be “for-eached” over.  To do “foreach” the CLR has to…


More VSTO 2005 Video Magic

Kathleen has created two new videos you should check out.  Nice! Demo 5–How to Resize Excel Controls Demo 6 – How to Add Controls to the Actions Pane


Office Watsoning and Exceptions in VSTO 2005 Beta 1

[EDITOR’S NOTE] Blogging has been slow as we are spending almost all our time getting Beta 2 out the door. You may have had the experience of Excel or Word causing an Office Watson error at debug time when you have an exception that occurs in your Windows Forms event handlers in VSTO 2005. The…