More Outlook Resource Sites

Microsoft Developer Network (MSDN)

FAQs and other general resources

Outlook Developer News

Updated solution for a custom form list box bound to a keywords field

On an Outlook custom form, if you bind a multi-select list box to a keywords field and populate the list box's rows in code, the list box will have no selected rows when the user reopens a previously saved item, making it look like the user's data has been lost. The Form Controls Demo form has been updated to demonstrate a workaround for this issue.

The problem apparently is that the field value is applied to the control before the list box rows are populated. The solution is to use code in the form's Item_Open event handler to select the appropriate rows after the list rows have been populated, but -- to add to the complications -- it is not possible to access the value of a custom keywords field directly. A workaround for that issue is to bind a text box to the keywords property and read the value from the text box control; see More Fun with Keywords. To simplify the process of finding the row whose text matches a particular value in the keywords field, the code uses a Scripting.Dictionary object to hold the same values as the data used to populate the rows and handle the lookup.

To see the solution, download Form Controls (9kb, 9 Jul 09), unzip it, open the .oft file, and publish that form. Then use the published form to create a new task.

This form also demonstrates two other ways of handling a multi-select list box and two ways to handle option buttons. For more information on those controls and others, see Controls on Outlook Forms.

New hotfix for Outlook 2007 - June 30, 2009

The June 30, 2009, hotfix package for Outlook 2007 fixes several developer issues:

A new ReliableFolderMoveEvent registry entry solves a problem with the BeforeFolderMove event ceasing to fire after a while.

When applications create new categories programmatically, those categories should now still be available after a restart of Outlook.

Custom form icons that weren't displaying on Windows Vista with a high DPI display (for example, 120 DPI) should now display correctly.

In Cached Exchange Mode with the reading pane active, messages based on custom forms that have VBScript code behind them should no longer increase CPU usage or crash Outlook.

The hotfix also resolves a problem with accessing fields in CDO 1.21 applications.

Outlook 2007 Programming chapters available on MSDN

Three chapters from Sue Mosher's Microsoft Outlook 2007 Programming book are now available on MSDN:

Sample code for these chapters is available from the get Sue's code link at the top of the page.

Outlook 2007 performance improvements in SP2

Office 2007 Service Pack 2 targets Outlook with a long list of performance improvements related to .ost and .pst files, startup, shutdown, and folder switching. For details, see:

Outlook 2010: No support for Exchange client extensions

Back before Microsoft extended Outlook with support for add-ins, beginning with Outlook 2000, developers added functionality to Outlook by building Exchange client extensions -- or ECEs -- using the Extended MAPI programming interface. Microsoft in fact built its own ECEs to manage such Outlook features as deleted item recovery.

Beginning with Outlook 2010, ECEs will not load in Outlook, according to Randy Byrne of the Outlook team. Randy provides more background on ECEs in his article for the Outlook team blog, where he explains the options that ECE developers face if they want to redesign their applications to work in Outlook 2010 and asks for your feedback, especially your concerns about parity between ECE and add-in capabilities.

From the Forums

Basic Outlook Techniques
Inserting Shapes in Outlook message
Hi I am trying to write a macro to add to my quick access toolbar in 2010 which will automatic insert a circular shape with no fill. I recorded this macro in Excel but how do I incorporate this into outlook. <CODE> '***will Insert a circular...
Create recurring email/alert in Outlook 2007...
Hi all, I need to create an email that recurs after 1, 3, 6, 9, and 11 months from the day it is sent. I only want to have to send it once. The purpose is to alert project team members to complete a task due at the intervals listed above. If possible,...
Outlook Form Design
Looking for help designing an Outlook Calendar...
I'm responsible for creating/maintaining a calendar of my department's marketing events (trade shows, user meetings, editorial articles, blogs, webinars...). I'd like to create an Outlook form (or forms) that the event owners complete for posting to the...
Custom Appointment Form
Exchange 2007, Outlook 2007. Organizational Forms Library. I've created a Leave Request Form. I've added several Cutom Action forms such as Approve Leave, Deny Leave, and Add Leave To Your Claendar. These custom action forms are all published in the...
Outlook Expert Techniques
Help please! Custom Appointment Form - CheckBox...
I have been searching around for weeks but cannot locate the solution to my issue. I apologize if this topic has been posted before! I have a custom appointment form that is the second tab of my appointment (the default appointment tab is still visible...
Where to publish a form in Exchange 2010?...
Hello! We are merging to Exchange 2010 and shall not use Organizational folders (due to too heavy synchronizing) or Personal Folders (removing *.pst) and we don't use Sharepoint. My form is for IPM.Appointment for the whole organization. It only...
Outlook and .NET
Forward Compatibility of Office 2003 Add-In...
I've built a VTSO add-in using Visual Studio 2008 targeting Outlook 2003 as the minimum version. Works fine on Outlook 2003, 2007, and 2010. However, it does not load in Outlook 2013. I see the dreaded message in Outlook "Not loaded. A runtime error...
Website link to run a pre-defined search...
Hi, I am building an internal website and one of the features i am trying to get is to create a link from the website to outlook. So, once the users are on the webpage and click on the string link "TR123", it will jump to outlook 2010 and run TR123...
Code Essentials
VBA Get Attachments Amendments
I have obtained some VBA code which saves all atatchedments in the Inbox to a folder on the hard disc. I basically don't want it to copy all files in the inbox but a selected folder. Could somebody amend the code to select a folder and not the indox...
Open Standard Outlook Templates
I open every Morning a Series of Outlook Templates in the following directory. C:\Users\cowins\AppData\Roaming\Microsoft\Templates\ The List of Templates is as Follows Doxford Webhosting backup report - xxxxxx.oft Doxford servers XXXXXX.oft Duty...

Newest Resources

Creating an add-in for Outlook 2013 - 2003 with a single code base -- The video demonstrates how to support all versions of Outlook 2013 – 2000 in one project using Visual Studio 2012.

Advanced Outlook Form and View Regions -- An extension of Visual Studio Tools for Office (VSTO) 2008, 2010 and 2012 that allows customizing Outlook forms and views with any .NET controls.

Auto BCC Outlook add-in -- Automatically creates bcc/cc copies of your outgoing emails based on flexible rules.

Print all attachments at once using VBA -- Udi Shitrit shows how to use the Win32 to print all of a message's attachments -- no need to know the file types involved.

Outlook 2010 MAPI Reference -- Official Microsoft reference for MAPI development against Outlook 2010. Header files are also available.

(Less than) Portable Search Folders -- Stephen Griffin explains why search folders created by Outlook object model code may not always work and offers a partial solution.

How to programmatically select a custom Form Region -- Helmut Obertanner demonstrates, with screen shots, how to create a form region for an Outlook 2007 contact form and add a button to the Ribbon to switch the Inspector display to the region.

Customize the built-in Outlook Select Names dialog (or any other) -- Helmut Obertanner demonstrates how to intercept an built-in Outlook dialog and display instead a custom .NET form.

Outlook Forms Step by Step -- Create a check request form and make it available on the company intranet with this 16-part illustrated guide.

Duplicate Email Remover for Outlook -- This add-in can find duplicated messages by looking at the text in the message body, headers, subject and attachments.

Reply to an email with a template -- Template Phrases add-in for Outlook allows inserting frequently-typed text into an e-mail message in a click.

Making a Custom Ribbon Appear Only for a Custom Outlook Form -- Norm Estabrook from the VSTO team shows how to make custom tabs, groups and controls appear only in cases where the user opens a custom form in Outlook.

Outlook Context Menus and Creating a Meeting from an Email -- Short video demonstrating how to create a context menu command for sending a meeting request to recipients of an email message. Note: The Inspector wrapper class is extraneous and overcomplicates the project.

How to get the IWin32Window for Outlook -- This C# class from Helmut Obertanner could be used to pass the Outlook as parent to .Net Forms and Messageboxes to prevent those UI elements from being hidden by Outlook windows.

Additional custom panel in Microsoft Outlook -- Lukas Neumann uses Windows API techniques to hack the Outlook user interface and add a custom panel in the Explorer window.

Hot Code Samples

Save and remove attachments from email items...
Create task from e-mail message (revised)...
OL2007: Run all rules against inbox
C# AddIn sample: InspectorWrapper & CommandBar...
Reply with Attachments
Send Word document as message
Insert user signature with VBA
Set color label on appointment
Set email account signature in Outlook 2003...

OutlookCode RSS Feeds

All content

Outlook developer news

New Outlook developer resources forums code samples articles