Wrox Programmer Forums
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 15th, 2006, 10:25 AM
Registered User
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default add a custom field to a mail item

I have developed an add in for Outlook 2003 which crates a custom field for a mail item using following code:

Microsoft.Office.Interop.Outlook.UserProperty campo;
Campo=_oMailItem.UserProperties.Add("fldMatteo",Mi crosoft.Office.Interop.Outlook.OlUserPropertyType. olText, null, null);
campo.Value = "Example";

Then, once riceved the same mail to the destination Outlook, I was able to read the custom field with the following code:

Microsoft.Office.Interop.Outlook.UserProperty nuovocampo;
nuovocampo = m_oMailItem.UserProperties.Find("fldMatteo", true);
return "Valore: " + nuovocampo.Value;

Everithing was ok, it worked both with outlook client linked to an exchange server or simply using the outlook client to download the mail by pop3 protocol.

Once I upgraded the Office with KB913807 something has changed. Now I’m not more able to read this custom field if the client isn’t linked to an exchange server. If the client is linked to the exchange server everithing works.

How can I solve the trouble?

Similar Threads
Thread Thread Starter Forum Replies Last Post
setting from address in outlook mail item bishnupokhrel Pro VB 6 1 January 26th, 2011 10:28 AM
cannot add a new item to this menu ... paulmarshall General .NET 0 April 18th, 2007 03:03 PM
How to send an Outlook mail item to a URL haiying Access VBA 0 April 29th, 2005 08:08 AM
add conditional DataList item jtyson ASP.NET 1.0 and 1.1 Basics 1 July 1st, 2003 01:10 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.