Hi
i want to extend the default functionality in a
Microsoft.Office.Interop.Outlook.AppointmentItem object in my Outlook 2007 add-in.
As a necessity of my project, i would like to add custom data to that class, let's say an ID from my database.
After some searching, i realised that the AppointmentItem is an interface which can be implemented in a custom class.
Implementing the interface forces me to implement all its members, which is quite the list!
For example, my custom appointment class:
class
MyOutlookAppointment : Microsoft.Office.Interop.Outlook.AppointmentItem
{
private Int32 _myID;
public MyOutlookAppointment(){ }
public Int32 MyID{
get { return _myID; }
set { _myID = value; }
}
}
Is there a way i could refer to the original object in the properties and methods, so that i do not have to write the logic for each property ?
For example something like this:
#region
_AppointmentItem Members
public Microsoft.Office.Interop.Outlook.Actions Actions{
get { return parent.Actions; }
}
This could be solved by creating a property Actions in my custom class, and setting/getting that value. But what about the "Save()" method of the AppointmentItem ?
And is this allowed in Outlook 2007? Will the "
Outlook.OlDefaultFolders.olFolderCalendar" add my custom object as an appointment?