none
UserProperties not available from other machines

    Question

  • I have a strange issue regarding UserProperties of an AppointmentItem.  I have created a Region with a couple of user defined fields, saved it to the network, created the necessary XML file and stored it in the same place, and added the required registry entry to HKCU.  I have then added the same registry entry on another machine running the same version of Outlook (2007).  If I create an appointment on machine 1, inputting data into my region, I can see by looking at the UserProperties of the item that this stores successfully.  If I then open the same record on machine 2 I can see that region shows correctly with data pupulating my additional fields.  If however I inspect the UserProperties of the item from machine 2, there are no additional fields available.

    What have I done wrong?


    Alan Moseley


    Sorry, forgot to mention that both machines are connecting to the same user mailbox in this example.
    • Edited by Alan Moseley Tuesday, November 27, 2012 4:40 PM Forgot to explain aspect of scenario
    Tuesday, November 27, 2012 4:37 PM

Answers

  • Hi Eric.  Many thanks for your suggestion but it sadly did not help.  I have found a workaround though.  Rather than obtaining my property via:-

    objAppointment.UserProperties("MyProperty").Value

    instead I use:-

    objAppointment.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MyProperty")
    If this points towards me having done something wrong then I'd love to hear about it, other than that I'm good to continue with my project now.  Many thanks.

    Alan Moseley

    • Marked as answer by Alan Moseley Tuesday, December 18, 2012 2:42 PM
    Tuesday, December 11, 2012 3:04 PM

All replies

  • Are you saying an Appointment opened on PC1 shows your custom field values in your form region, but it doesn't for that same item on PC2?  That would be very strange.  Are those fields published to the folder as well (i.e. can you see the values for your custom fields in the folder view)?

    Otherwise, how are you referring to the .ofs file in your manifest if that file is stored on the network?  You cannot use UNC paths in the layoutFile element.  Even if you use a mapped drive I'm not 100% sure form regions are supported if they aren't deployed to the local hard drive.  I doubt this would be related to your issue though.


    Eric Legault MVP (Outlook)
    About me...
    Try Outlook Appins - affordable and easy to use!

    Tuesday, November 27, 2012 5:09 PM
  • Eric

    No, on both PC1 and PC2 the extra fields show perfectly in the modified region.  My problem is more unusual than that.  If I create a record on PC1, and then use VBA to interrrogate the UserProperties of the record, all is fine.  If I then go to PC2 and use VBA to interrogate the record created on PC1, there are no UserProperties.  If I then open the record, change it, and save it, the UserProperties are now present.

    To clarify, I created an ofs file using my additional fields and stored it in a network share.  I then created an XML file in the same location, its contents are:-

    <?xml version="1.0"?>
    <FormRegion xmlns="http://schemas.microsoft.com/office/outlook/12/formregion.xsd">
        <!-- Internal name -->
        <name>MyAppointmentRegion</name>
        <!-- Display name -->
        <title>Project Planning Information</title>
        <!--  Additive adjoining form region -->
        <formRegionType>adjoining</formRegionType>
        <!--  Outlook form region file is in the current folder relative to the location of contoso.xml -->
        <layoutFile>myappointmentregion.ofs</layoutFile>
        <!-- Display form region when inspector is in the Reading Pane -->
        <showPreview>true</showPreview>
        <!-- Version of form region -->
        <version>1.0</version>
    </FormRegion>

    I then added an entry to the registry of both machines:-

    [HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\FormRegions\IPM.Appointment]
    "MyAppointmentRegion"="\\\\myserver\\myshare\\OutlookRegion\\myappointmentregion.xml"

    Essentially, I following this document:-

    http://msdn.microsoft.com/en-us/library/office/bb206785(v=office.12).aspx


    Alan Moseley

    Tuesday, November 27, 2012 7:48 PM
  • Can you use OutlookSpy or MFCMAPI to look for those custom fields on the item that's missing them?

    Otherwise, I'm not 100% sure referencing the manifest file in a network share is supported either - see here:

    Specifying Form Regions in the Windows Registry:
    http://msdn.microsoft.com/en-us/library/ff860990.aspx

    It says: "The full local file path name to a form region XML manifest file".

    It may or may not be related to your UserProperties issue, but it's worth adhering to the guidelines to circumevent any other weird issues that may arise.


    Eric Legault MVP (Outlook)
    About me...
    Try Outlook Appins - affordable and easy to use!

    Tuesday, November 27, 2012 8:42 PM
  • Hi Eric.  Many thanks for your suggestion but it sadly did not help.  I have found a workaround though.  Rather than obtaining my property via:-

    objAppointment.UserProperties("MyProperty").Value

    instead I use:-

    objAppointment.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MyProperty")
    If this points towards me having done something wrong then I'd love to hear about it, other than that I'm good to continue with my project now.  Many thanks.

    Alan Moseley

    • Marked as answer by Alan Moseley Tuesday, December 18, 2012 2:42 PM
    Tuesday, December 11, 2012 3:04 PM
  • That approach is equally valid, just a little more difficult.  It's strange that UserProperties aren't working as expected for you.


    Eric Legault MVP (Outlook)
    About me...
    Try Outlook Appins - affordable and easy to use!

    Tuesday, December 11, 2012 3:55 PM