.Net, Data Sources, MS Exchange, MS Office, MS Outlook, Outlook, Outlook 2010, Programming, Software, VB.NET, Visual Studio, VSTO

Programatically Connecting to MS Exchange Using EWS

You can do a lot with your code when you write an application that communicates with your Exchange server. But getting the setup to work for you in Visual Studio isn’t always as intuitive as it should be. Here are the steps I went through getting my project in Visual Studio set up and connecting to MS Exchange.
Continue reading “Programatically Connecting to MS Exchange Using EWS”

C#, msoControlComboBox, Programming, SharePoint, Software, Technology, VB.NET, VSTO

VSTO Add a Menu Item to Outlook and Save an Email into SharePoint

SharePoint Documents List
SharePoint Documents List

Some really cool functionality that you can put together is to automate saving emails from your Outlook email application to be stored in a SharePoint document list. This lets your users keep using the tools they are comfortable working with (such as Outlook), but helps make sure that important emails are backed up to a reliable storage and reporting medium like SharePoint with as little effort on the user’s part as possible.   Continue reading “VSTO Add a Menu Item to Outlook and Save an Email into SharePoint”

.Net, C#, msoControlComboBox, msoControlEdit, Outlook, Outlook 2007, Outlook 2010, Programming, Software, VB.NET, VSTO

VSTO for MS Outlook 2007 – Using msocontroledit and msoControlComboBox in the Commandbars

Outlook Custom Search Fields
Outlook Custom Search Fields

VSTO for MS Outlook can be a powerful way to customize Outlook programmatically. However, the syntax can be finicky at times and I have found a few instances where the programming logic becomes tricky.

For example, you can use VSTO to add a text box to the Outlook command bar window. This can be put to a number of good uses when building a custom component for Outlook. My thoughts behind adding the controls to Outlook were to allow the user to select a type of search to run in the custom dropdown list, and then to use the text box for the user to add text that the system would use to run a search on custom email fields.

In my case I wanted to add a textbox and a ComboBox to my main Outlook Explorer view. The VSTO controls in Outlook are called msoControlEdit and msoControlComboBox respectively.

At first glance adding a simple text box and dropdown list sounds like a simple requirement. But as I found out, this isn’t quite the case. The problem? Outlook by default will clear any entered text from the new text box when focus is lost. I’m not sure what the reasoning behind this is, but from reading help articles  and forum posts, it appears that many people are coming up against the same problem.

As a positive, the ComboBox control does retain selected text, so we will not need to worry about handling this control.

For the convenience of readers of this article; I am including a full example of how to add a textbox and a ComboBox  to the Outlook main command bar at the end of this article.

Continue reading “VSTO for MS Outlook 2007 – Using msocontroledit and msoControlComboBox in the Commandbars”