Monday 5 April 2010

Opening the Internal web Browser in Outlook using VSTO

It might sound like a simple thing, and when you look at the code it really is, but finding this tiny little snippet has taken absolutley ages to track down. Anyway, Big big big thanks to Mostafa Elzoghbi and his blog entry which can be found here...

http://moustafa-arafa.blogspot.com/2008/06/open-browser-in-outlook-in-vs-add-ins.html


And, for the impatient, the code is basically...

// Use this to find the webbrowser control
Office.CommandBarComboBox webControl1 = (Office.CommandBarComboBox)this.Application.ActiveExplorer().CommandBars.FindControl(26, 1740, missing, missing);

// use this to navigate to whatever site you want to
webControl1.Text = "http://www.iphelion.com";


Thanks again Mostafa!

A

No comments:

Post a Comment