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
| Deleting Calendar Entries |
| My company has a very small limit on how big my Outlook storage can be (50mb). My Calendar is now taking up 21 mb of that so I want to delete a bunch of my old entries to free up the memory.
Can someone share some VBA code to specify a date range and... |
| Toggle New Mail Desktop Alert |
| In the Advanced Email Options (OL 2007), you can turn on and off Desktop Alerts for new Mail as well as "Show an envelope icon in the notification area."
Sometimes I want this enabled and sometimes I need to focus without distracting pop-ups. I'd... |
| Multipart, User to User Form |
| Question from an obvious rookie. And yes I have the book... sitting on my shelf - demands are many, time is limited (purchased 2 years ago). Before I travel down the 80 - 120 hour path to learn a new technology I am trying to determine if an Outlook form... |
| Approval Form - Restricting Action by User... |
| We need to create a form to facilitate the request processing. The key is that we need to accomplish two goals:
A) The requested action will be retricted to a set of items in a drop down list. The set will never be static. On the other hand it will... |
| Zipped csv to Access from email |
| Hi, I'm looking for a solution to move the data contained in csv files, which are zipped and attached to emails into an Access database. I can generate reports which are sent via email. Normally I would open attachment, extract file to directory and import... |
| Moving Sent Items - problem when email is... |
| Hi Sue
I have the following in my Outlook 2003 addin. The intention is to move emails sent from a shared email address to the Sent Items folder of the shared email and not the default Sent Items folder. (The GetFolder function is yours)
I have... |
| Is there any difference between Office 2003... |
| Hello,
My question is: Is there any difference between Office 2003 Basic Outlook and Office 2003 Standard Outlook? The reason I am wonder is I can connect via Outlook com component and get all the mailboxes that a user has set up when they have Outlook... |
| Forcefully Load Addin |
| Hello All,
I have created the Outlook addin in Visual Studio 2008 and I am using TasPane in that for inserting custom controls and it's working fine, but sometime while opening the Outlook, my addin is not appearing.
I saw one thing that after closing... |
| Looping all controls |
| Set controlPage = Item.GetInspector.ModifiedFormPages("Message")
Dim ctl As Control
For Each ctl in controlPage
'code
Next ctl
I'm trying too loop all controls in message tab, but it pop up an error with "Expected end of statement" with this... |
| Outlook 2010 with BCM: bcmContactsFldr.Items.Find("[FileAs]... |
| I reused some published code that was initially developped for Outlook 2007 with Business Contact Manager. The following statement in the code would result in setting the existContact to become the contact I am looking for.
Set existContact = bcmContactsFldr.Items.Find("[FileAs]... |