none
Outlook VSTO Addin > Customize the Meeting form using Outlook Form Regions > Unable to persist values for custom fields RRS feed

  • Question

  • Hello,

    I have customized the Outlook Meeting form in Visual Studio using Outlook Form Regions and have added few custom fields/controls on it.

    The problem is, when I re-open the saved meeting item, the values of the custom fields are not persisted.

    Need further guidance.

    Thanks!


    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Monday, April 18, 2016 8:37 AM

Answers

  • Hello Eugene,

    I have found a work around to persist the values. What I did is, I saved the custom field values in the UserProperty of the MeetingItem when it's send and then when it's re-loaded, I read the values back from the UserProperties & fill the controls.

    Could you please guide if this approach is in the right direction or not?

    Thanks!


    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Wednesday, April 20, 2016 4:37 AM

All replies

  • Hello Vinay,

    What code exactly do you use for adding properties? 

    Make sure the item is saved right after you added properties.

    Do you release underlying COM objects instantly?

    When you work with calendar items, you should release any prior references, obtain new references to the recurring appointment item before you access or modify the item, and release these references as soon as you are finished and have saved the changes. To release a reference in Visual Basic for Applications (VBA) or Visual Basic, set that existing object to Nothing. In C#, explicitly release the memory for that object. Use System.Runtime.InteropServices.Marshal.ReleaseComObject to release an Outlook object when you have finished using it. Then set a variable to Nothing in Visual Basic (null in C#) to release the reference to the object.

    Note that even after you release your reference and attempt to obtain a new reference, if there is still an active reference, held by another add-in or Outlook, to one of the above objects, your new reference will still point to an out-of-date copy of the object. Therefore, it is important that you release your references as soon as you are finished with the recurring appointment.


    [custom.development]

    Monday, April 18, 2016 8:54 AM
  • Hello Eugene,

    Thanks for sharing such important information.

    Yes, I do release the underlying COM object. Still, will validate if this is getting done in the right way or not.

    Thanks again!


    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Tuesday, April 19, 2016 8:29 AM
  • What code do you have now?

    [custom.development]

    Tuesday, April 19, 2016 11:30 AM
  • Hello Eugene,

    I have found a work around to persist the values. What I did is, I saved the custom field values in the UserProperty of the MeetingItem when it's send and then when it's re-loaded, I read the values back from the UserProperties & fill the controls.

    Could you please guide if this approach is in the right direction or not?

    Thanks!


    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Wednesday, April 20, 2016 4:37 AM
  • Hi Vinay,

    I agree with you on this work around.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, April 20, 2016 6:48 AM