Accessing non-standard properties in ICS file

Add-in Express™ Support Service
That's what is more important than anything else

Accessing non-standard properties in ICS file
Opening an ICS file and accessing the non-standard properties from an inspector window 
Dan Allison


Guest


We are trying to access non-standard properties included in ICS files (using the ?Â?Ð?ìX-?Â?Ð?ì syntax) that our users will be opening using Outlook. Our use case involves a user downloading an ICS file and then opening it (with Outlook), which causes Outlook to open a new meeting inspector window where they can then save the meeting to their calendar. We would like to access the non-standard properties from the context of the new inspector window.

Our entry point right now is a ?Â?Ð?ìAddinExpress.MSO.ADXOlInspector_EventHandler?Â?Ð?í function that we have wired to the ?Â?Ð?ìADXOutlookAppEvents.InspectorActivate?Â?Ð?í event. In the event handler, we are using the following code to gain access to the meeting information (with some other irrelevant code that has been removed):

Outlook._Inspector olInsp = (Outlook._Inspector)inspector;
object item = olInsp.CurrentItem;
Outlook._AppointmentItem appointmentItem = (Outlook._AppointmentItem)item;

Once this is completed, we have access to all of the standard information re: the meeting (start and end time, attendees, etc), but the resulting object does not appear to include any reference to non-standard properties.

We have seen that it is possible to work with ICS files using AddInExpress (https://www.add-in-express.com/creating-addins-blog/2013/12/20/create-outlook-files/#working-with-ics-files) however we will not always know from what directory the user will be attempting to open the file, and we?Â?Ð?ére not aware of a way to retrieve that information from the context of the inspector activate event handler.

Do anyone have recommendations for how we would be able to access the non-standard properties of an ICS file from the inspector window context?
Posted 23 Mar, 2018 16:53:18 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Dan,

Are the "X-" properties available if you open such an .ICS file and navigate File | Properties? If so, I suggest using PropertAccessor as shown at https://msdn.microsoft.com/en-us/vba/outlook-vba/articles/propertyaccessor-getproperty-method-outlook.


Andrei Smolin
Add-in Express Team Leader
Posted 26 Mar, 2018 09:25:57 Top
Dan Allison


Guest


Hi Andrei,

Thanks for your response. Unfortunately, we do not see the "X-" properties when opening the ics file and going to file > properties. We're using the Outlook 2016 client.

Also, we are using C# with our add-in. Do you have the specific syntax for C# to access the "X-" parameters?

Thanks,
Dan
Posted 03 Apr, 2018 10:19:53 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Dan,

Could you please send me such an .ICS file to the support email? Find it in {Add-in Express installation folder}\readme.txt; please make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 05 Apr, 2018 08:03:55 Top
Dan Allison


Guest


Thanks, Andrei.

I've sent the ics file to the support email address.

Best,
Dan
Posted 05 Apr, 2018 14:10:39 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Dan,

Thank you for the file. I suggest that you read and parse it before it is opened by the user, say, when the user selects the mail item containing that file attached. Also, I suggest that the ICS provides an ID in the subject or body. In that case you could link the appointment opened by Outlook with the ICS information previously read.


Andrei Smolin
Add-in Express Team Leader
Posted 06 Apr, 2018 05:15:50 Top