[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Outlook MailItem Custom Fields not updating

Posted on 2008-11-09
9
Medium Priority
?
1,413 Views
Last Modified: 2013-11-10
Our company has been working on an Outlook AddIn using VSTO which has a number of issues which we have not been able to resolve yet. We have versions of the AddIn for both Outlook 2003 and Outlook 2007.
In our .NET addin we have created a couple of custom fields specific to our application on the Inbox folder. These link to user properties we create on the mail items. In code when we set the values for these user properties, we are calling mailItem.Save() both before and after to ensure the values get persisted.
We are noticing that sometimes the field value shown in the Inbox is not updating. Yet if we manually go into the mail item afterwards and save it from the GUI, it then updates properly. But closing Outlook and re-opening it or changing folders doesn't make it update. This appears to happen most often on mail items which have just been forwarded or replied to. We are unsure why the custom fields don't update sometimes and how to fix this.
 
Any help much appreciated.
0
Comment
Question by:timetracer
  • 4
  • 4
8 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 22921397
Hi, timetracer.

Are you saying that the underlying values aren't changing or that the changes aren't reflected onscreen?
0
 

Author Comment

by:timetracer
ID: 22926429
The underlying values are definitely changing because if the mailItem is opened in its own window and saved again, the folder updates.

It's just not updating onscreen when we perform the save from code. Also closing and restarting Outlook doesn't fix this. You have to manually go into the individual mailitem and save from the GUI to get it to update.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22945407
Does refreshing the view (i.e. pressing F5 in the explorer view) make them appear?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:timetracer
ID: 22957473
This issue is intermittent so it is difficult to test. We will undertake to do so the next time it occurs.
If it does or does not make them appear, is there anything you can think of that we could do in code to ensure that they are updated?

Thank you for your assistance.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 22959437
If refreshing the screen makes them appear, then you can refresh the screen from code after saving an item.  If refreshing the screen doesn't help, then we're back to square one.
0
 

Author Comment

by:timetracer
ID: 22972595
I have reproduced the issue, but I was unable to refresh the screen because Refresh was disabled. I think this may be because the folder is an Exchange Mailbox.

Which method can I use to refresh the screen from code? I have not seen any obvious candidates in the object model.
0
 
LVL 76

Accepted Solution

by:
David Lee earned 1000 total points
ID: 23255022
Apologies, I lost track of this question and just now rediscovered it.  There isn't a command for refreshing the screen.  Instead, you have to simulate the pressing F5 or pulling down the View menu and selecting Refresh.  The code for simulating pressing F5 is below.  Of course if Refresh is unavailable, then it won't have any affect.
SendKeys "{F5}", True

Open in new window

0
 

Author Comment

by:timetracer
ID: 23370117
Thank you for your assistance.

I will investigate further to see if this solution can help some of the people experiencing the issue, or if Refresh is unavailable on all the machines.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 trialware OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their Exchange server is no longer available or other critical issues with Exchange server or impo…
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question