User Property changes show up on the outlook 2013 UI correctly but it does not show up on the MailItem User Properties in Shared Account between PCs Environment
Hello There,
I have written an Outlook Add-In to add several User Properties to our incoming emails. This add-in will be installed in 100 computers in different states and our Exchange server is hosted in our datacenter in CA.
Everything works great but there is an odd thing happens and that is when one PC changes a UserProperty Value all the other PCs show up that change on their outlook UIs but when I get the MailItem object from the same other PC is
not showing the changes. But if I shutdown outlook on that PC and open it up again the changes will be showing up in the MailItem object. It seems to me that MailItem doesn't refresh but UI does.
Does anyone know how I can refresh the MailItem after its UserProperties has been changed from another pc in a shared account environment.
These are my codes to save a property and show all properties:
Public Sub SaveUserProperty(xName As String, xValue As String)
Dim ns As Outlook.NameSpace = Me.Application.GetNamespace("MAPI")
Dim oMailItem As Outlook.MailItem = Nothing
Dim oUserProperties As Outlook.UserProperties = Nothing
Dim oUserProperty As Outlook.UserProperty = Nothing
Try
oMailItem = ns.GetItemFromID(curMailId)
oUserProperties = oMailItem.UserProperties
oUserProperty = oUserProperties.Find(xName)
If oUserProperty IsNot Nothing Then
oUserProperty.Value = xValue
End If
oMailItem.Save()
Catch ex As Exception
MsgBox(String.Format("{0}: {1}{2}", "SaveProperty", vbTab, ex.Message))
Finally
If Not IsNothing(oUserProperty) Then
Marshal.ReleaseComObject(oUserProperty)
oUserProperty = Nothing
End If
If Not IsNothing(oUserProperties) Then
Marshal.ReleaseComObject(oUserProperties)
oUserProperties = Nothing
End If
If Not IsNothing(oMailItem) Then
Marshal.ReleaseComObject(oMailItem)
oMailItem = Nothing
End If
If Not IsNothing(ns) Then
Marshal.ReleaseComObject(ns)
ns = Nothing
End If
End Try
End Sub
Public Sub ShowUserProperties()
Dim builder As StringBuilder = New StringBuilder()
Dim ns As Outlook.NameSpace = Me.Application.GetNamespace("MAPI")
Dim oMailItem As Outlook.MailItem = Nothing
Dim oUserProperties As Outlook.UserProperties = Nothing
Dim oUserProperty As Outlook.UserProperty = Nothing
Try
oMailItem = ns.GetItemFromID(curMailId)
oUserProperties = oMailItem.UserProperties
For Each oUserProperty In oUserProperties
builder.AppendFormat("{2}:{0}{3}{1}", vbTab, vbNewLine, oUserProperty.Name, oUserProperty.Value)
Runtime.InteropServices.Marshal.ReleaseComObject(oUserProperty)
Next
If (builder.Length > 0) Then
System.Windows.Forms.MessageBox.Show(builder.ToString(), "The UserProperties collection")
End If
Catch ex As Exception
MsgBox(String.Format("{0}: {1}{2}", "ShowUserProperties", vbTab, ex.Message))
Finally
If Not IsNothing(oUserProperty) Then
Marshal.ReleaseComObject(oUserProperty)
oUserProperty = Nothing
End If
If Not IsNothing(oUserProperties) Then
Marshal.ReleaseComObject(oUserProperties)
oUserProperties = Nothing
End If
If Not IsNothing(oMailItem) Then
Marshal.ReleaseComObject(oMailItem)
oMailItem = Nothing
End If
If Not IsNothing(ns) Then
Marshal.ReleaseComObject(ns)
ns = Nothing
End If
End Try
End Sub
Outlook will not see the latest changes downloaded from Exchange (or changed through MAPI bypassing the Outlook Object Model on the local machine) until the MailItem object is completely released and reopened. The explorer list shows the changes since it
is fed off the underlying folder contents table, not the cached MailItem object.
There is nothing you can unless you make sure the MailItem object is released and is never kept referenced fro any prolonged periods of time.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/redemption
Redemption - what the Outlook
Object Model should have been
Version 5.5 is now available!
Similar Messages
-
I cannot sync with my music on itune to iphone. I checked the songs, or the play lists, start sync, but it does not put them on the iphone. Some of the songs are from CDs
Hi Mike,
I have Iphones since they cam out buy IO7 on my iphone 4 is slow and frustrating. I sync itunes with sync window. I tried cable and wireless. I have enough space. If I have a playlist say with 200 songs it will say on itunes sync window syncing 200 songs however I only get 150 songs on my iphone. I have restored iphone twice, I have tried playlists and smart play lists. It seems not to sync the same songs all the time. Prior to IO7 in sinced all my songs. I see on the chats that this is a big problem. Do you have any solutions. the songs that dont sync are the same format as those that do.
Alx -
My ipod screen does not light, you can see the icons, connects to itunes but it does not even light up the brightness of the screen. I made him the restoration of production and did not work.
Please I need to know what do I have to do.
RegardsIf you can't enter the passcode then you have to place the iPod in recovery mode and then restore the iPod via iTunes. For ecovery mode see:
iPhone and iPod touch: Unable to update or restore
Note that this requires using the sleep/wake button. If you are not successful then there is nothing else that I know you can do. -
Firefox Version 22.0
Thanks for your attempted help. I went back to an earlier version of Firefox, which restored the Roboform toolbar. Then, when my automatic updater ran, the Roboform toolbar remained.
I like Firefox, but it is sometimes like a high-maintenance chick; very needy! -
I use the Icalendar at home, at work, and on my Iphone. I don't want to have to "sign in" every time I need my calendar. How do I stay signed in? I have checked the "keep signed in" box, but it does not work.
Welcome to the Apple community.
Staying signed in at iCloud.com is not a problem for me. Try resetting your browser or emptying its cache. -
To sync contacts with my computer, I choosed "Sync Contacts with" within iTunes for Windows Outlook and Its suncking but contact is not showing in the Oulook contact.
Do changes/additions to the contacts list in Outlook appear on the iPhone?
-
My iPad was lost today. I am using the Find My iPhone app, but it is not showing on the device list or the map (though my iPhones, even one that is not iCloud enabled, is). What can I do?
The only thing you might do is enable Lost Mode, which will allow you to set a passcode on it (as well as a message and phone number where you can be reached) so it will be locked when and if it does go online. You can also receive an email informing you if it goes online so you can track it on icloud.com. See http://help.apple.com/icloud/#mmfc0f0165.
In the meantime, you may want to change your passwords. -
I recently tried to manage my storage by upgrading my plan to a 20GB and was charged but plan does not show changed
i have the same problem. I recently tried to manage my storage by upgrading my plan to a 20GB and was charged but plan does not show changed. At this time does not changed my plan yet. I have the reference number of the bank for the transaction.
<Email Edited by Host> -
How can I get ALL of my Google Calendars to show on the iCal on my iPhone?
I see all of my Google Calendars on the iCal on my Mac, but I do not see them in the iCal on my iPhone. I only see one Google Cal, but not the others.https://www.google.com/calendar/iphoneselect
-
I currently have a mini server (OSX10.8.5, server 2.2.2) that I am using Time Machine to back up 4 external drives that are connected to the server via firewire 800. I would like to use Time Machine to back up to a windows network SMB drive. I can see the drive on my desktop but it will not show in the time machine window to be able to select it for use.
Can this be done
Thanks for any and all helpThe supported targets for Time Machine backups are local (direct-connected) disks, and network targets include Time Capsule, a disk hanging off the current-generation AirPort (though not earlier AirPort devices), and OS X Server systems.
The Time Machine storage is based on the HFS+ file system, so I would not expect TM to work with SMB file services.
While there are hacks to allow Time Machine to access network drives, I would not consider those to be reliable. Skim the forum and the 'net for related details, and for previous discussions of setting this up and the related issues that can arise.
Remember to test the recovery with whatever you decide to use; whole point of backups is the ability to restore the data, after all.
If you want to learn more about Time Machine, Pondini is an excellent resource. -
I'm also having a music issue. When my phone is attached to the computer (mac running 10.6.8) it looks like my music is there but its gray and I can't play anything. I've tried to delete it and it won't let me but it does not show up on my phone.
By the way, I have tried shutting of the display switching in the power settings. That was basically the only real answer I found anywhere. It didn't work.
-
After updating my iPhone4s to the lastest update my photostream stopped updated onto my comuter. From my phone it looks like pictures have been moved into the photostream folder... but they are not showing up on my computer. Help!
I have signed out then back into the cloud. I have comfirmed location of the photostream folder. I have have even restored settings on my phone. any ideas on what I can do to get it working again? or do I have to accept defect, and manually save my photos?There's a whole lot to read in your post, and frankly I have not read it all.
Having said that, this troubleshooting guide should help:
http://support.apple.com/kb/TS1538
In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it. -
I've rented & downloaded a movie on my computer in itunes, but it does not show up on my Apple TV. Everything else shows up on Apple TV, including my computer's movie library. When I click on the movie in Apple TV it says I've already rented it and asks if I want to rent it again. No, I just want to watch it.
Unfortunately I have to if I download it on my computer. I have rented itunes movies before directly using the Apple TV and it worked just fine and I could stay in the living room. Without clicking that icon on my computer, there was no way to watch it.
-
i purchased song on ipod but it does not show up. It took my money. When i tried to repurhase it says'already purchased'. Where the heck is it?
In iTunes select Store > Check for Available Downloads.
If that does not force the content to download, contact iTunes Support. -
I tried to purchase music at iTunes with the iTunes card I was given. I was able to redeem the amount and it shows on my apple Id I have $25 but it does not pay my purchase it will still go to my credit card and bill it. It did not give an option.
If you were instructed to call them, then that's what you should do. They will probably need to verify your identity before helping you with the security question.
Maybe you are looking for
-
I was looking at the Apple Stores newest Mac Book Pros (later 2013) and I noticed that all the newest Mac Book Pros have Retina. Is there an option to not get Retina with these newer ones? I want to save money on that and also I would liek to get les
-
I have some JEditorPane in my frame. How can I pass from one to the oder by pression tabulation key? Thx
-
I am getting an error with Backup Assistant
Everytime it runs it says: "Failed to SyncErrorcode:10". Thanks in advance for your help.
-
itemDisabled is not disabling the component in selectOneMenu <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <html> <head> <title>New Component</title> <style> .evenRows {
-
NWBC is not displaying all the menus
Hi Experts We are trying to access NWBC using the following link "http://<host>:<port>/sap/bc/nwbc" . NWBC screen is showing up properly but all the menus are not getting displayed. User is having SAP_ALL and SAP_NEW access.What we also discovered th