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
| How can I ? tried nearly everything |
| hi,
i want the user to choose a date in the calendar and by creating a new appointment it should be autofilled. i tried using a monitor and creating an appointment in the background with an invisible calendar and other stuff the main problem is:
there... |
| Create an appontment with macro |
| I am trying to create a macro that runs in Outlook 2007 when I receive
an appointment. The idea is that it will create a new appointment in a
local calendar called Home and then include my home email address. I
don't want to forward the appointment... |
| Pdf preview on Outlook custom form |
| Hello,
Is it possible to preview an attached pdf file to a journal item in a custom form (tab journal item type)?
Thanks for your help |
| Why doesn't my htmlbody text get sent to... |
| Hello. I created an email for with a few text boxes, comboboxes on it. A user fills these out and then clicks a button which takes the input data and creates an htmlbody message. All seems to work fine but when I send the email to the receipient they... |
| Reply to Mail |
| Hi to All;
This is kumar ... I got a scenario to share wit all of u...
1. IN OUTLOOK 2007 i want to add a New Button .
2. IN INBOX if i select A mail and CLICK the NEW BUTTON which i have added it should reply to him with a Pre-defined Message... |
| Query Outlook Tasks from Excel spreadsheet?... |
| A few years ago, the company I work for tracked jobs using Tasks in Outlook. We used the "mileage" field to record the job number. We've since switched to quickbase but for a project we're doing now, we need to work with data from the old Tasks in Outlook.... |
| outlook 2007 addin with c# - Error retrieving... |
| I am working on an Outlook addin using c#. I am more or less just trying different things to see how it all works. I first wanted to get some fields from an email written and sent in outlook. So I can get the To, CC, and subject with the following... |
| Reply to Mail |
| Hi to All;
This is kumar ... I got a scenario to share wit all of u...
1. IN OUTLOOK 2007 i want to add a New Button .
2. IN INBOX if i select A mail and CLICK the NEW BUTTON which i have added it should reply to him with a Pre-defined Message... |
| string size limit 255 characters |
| Hello,
I am using the following code to select values (text) from a listbox and write them into a textfield:
Sub Add_Click()
strBefSplit = Item.UserProperties.Find("ListBox").Value
strAftSplit = Replace(strBefSplit, "; ", vbCrLf)
Item.UserProperties.Find("TextField").Value... |
| Need some help with modifying code to forwarding... |
| Hi,
i have some vba code that wil forward the current selected mail to another mailadres.
But what i want is, that the code when executed forwards all unread or newmail to that specific adres
If anyone knows how to do this i should be glad.
Pls... |