VSTO & .NET & Excel

April 27, 2008

Check which Excel version is installed

Filed under: .NET & Excel — Dennis M Wallentin @ 4:31 pm

Whenever I need some enviroment information I always tries to read the wanted values from Windows registry.  In VB.NET this is as rather straightful process as we have access to the namespace “Microsoft.Win32′ which includes the class to work with the registry.

Recently I had a need to find out if Excel is installed and if so if the version is 2002 or later was available. Since I’m also trying to learn how to use regular expression I took this opportunity to use it.

The following code shows the function and how to get the wanted information from the registry:
 

The above approach works in both Windows XP and Windows Vista and it does not require that users must have administrative rights.

The code can also be downloaded as a textfile here.

Kind regards,
Dennis

April 13, 2008

VB Snippet Editor

Filed under: .NET & Excel, Tools, VSTO & Excel — Dennis M Wallentin @ 1:57 pm

Together with a lot of Intellisense improvements a large number of Code Snippets is also shipped with VB 2008. But what may be surprising is that there is no tool included to create and manage our own Code Snippets with.  This is where VB Snippet Editor comes in. It gives us the option to develop our own snippets in a rather easy.

The following screenshot shows the tool in action and its main screen: 

 

To download the tool: VB Snippet Editor

If I have the time for it I may consider to make my own snippets available as a download.

Kind regards,
Dennis 

Blog at WordPress.com.