Serialisation of VSTO/Outlook appointmentitem object?

518 views Asked by At

I'm currently using c# and vsto to create an addon for outlook and need to extract all of the data from an appointmentitem, I have tried the XML serialiser and it appears that the object is somehow protected, is it possible to get around this or is there another serialisation technique that would be capable of this? If not is there an easier way of extracting all the data from the object over accessing each individual property of the object (I don't really fancy typing each property out!).

1

There are 1 answers

1
Tedd Hansen On

Not all objects can be serialized. I would guess the Outlook AppointmentItem object is one of them. This is often due to references it has to other objects.

You may want to look into shallow/deep-copy: http://msdn.microsoft.com/en-us/library/system.object.memberwiseclone.aspx

In yout case making a shallow copy and serializing the copy may be enough depending on what you are planning to do with it.