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 Demo.zip (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
| Am I dealing with my email the hard way?... |
| I just wanted to check and make sure I’m not doing things the hard way like I usually do. I have a real tendency to go down a path and then realize that there are simpler ways to do things. At work, most of our computers are running Outlook 2002 and we’ve... |
| Need Visual Basic script for a macro in Outlook... |
| Hi,
I am looking to create a very straightforward macro in Outlook 2007 using some Visual Basic scripting. Unfortunately I am no developer, so this is not a trivial task.
Basically, I would like a single macro that when run (from a custom buton... |
| Call Macro from VbScript |
| Hello I am designing a custom outlook appointment form. I am a beginner with VBA and know nothing of Vb-script. In this form some one Will type an address into a form and on the property change event the form will querry a database and populate some tables.... |
| Outlook Form ComboBox Values |
| Hi,
I have created a custom appointment form in Outlook 2003, with a combobox placed on the form. I am trying to retrieve the value that the user selects for use with an if statement. However I always get type mismatch errors upon selecting a value.... |
| Programmatically remove code from ThisOutlookSession... |
| Hey all,
i'm developing an addin for Outlook which replaces some VBA code in ThisOutlookSession. Since this addin will be distributed by policies to all clients, i need to let the addin (or maybe even the addin setup) check if the macro code is present... |
| propertypage and control focus |
| I have been working with a property page and I am having two distinct problems.
1. the control with the first tab index is never given focus. The only way I have found to make this happen is to call the focus method directly in the paint event of the... |
| Custom Document Properties in Outlook |
| Hello! I want to set some custom document properties to msg-files like I can do it in Word and Excel via VBA. Unfortunately I don't how to do that. I tried it with User property but that's not the right way. Those User Properties do not appear when I... |
| How to convert a incoming email charset and... |
| Hi All,
i am new from outlook programming, is there any idea to use outlook's Rule function to run a script, which the script will auto convert the incoming email's charset and auto forward out?
Thank you for your help~~~ |