L
Livrish
I have implement a normal c# template service that runs in the
background to validate the information in a third party calender with
the outlook information however if I run the following when I get to
the "Body" propery it locks up.
itemProp.Name "Body" string
itemProp.Value error: cannot obtain value System.Object
This may also be related in that I cannot access an item using
OutlookNS.GetItemFromID(storeID,EntryID)
"A first chance exception of type
'System.Runtime.InteropServices.COMException' occurred in
outservice.exe
Additional information: Could not open the item. Try again."
even though I can access (most) of the informtion as follows
ClientQueue.Initialise();
System.Diagnostics.Debugger.Break();
// Create the Outlook application.
Outlook.ApplicationClass oApp = new Outlook.ApplicationClass();
// Get the NameSpace and Logon information.
// Outlook.NameSpace oNS =
(Outlook.NameSpace)oApp.GetNamespace("mapi");
Outlook.NameSpace OutlookNS = oApp.GetNamespace("mapi");
//Log on by using a dialog box to choose the profile.
//oNS.Logon( System.Reflection.Missing.Value,
System.Reflection.Missing.Value, true, true);
//Alternate logon method that uses a specific profile.
// TODO: If you use this logon method,
// change the profile name to an appropriate value.
//oNS.Logon("YourValidProfile", Missing.Value, false, true);
Outlook.MAPIFolder aFolder
= OutlookNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);
SortedList properties = new SortedList();
foreach(Outlook.AppointmentItem appointmentItem in aFolder.Items)
{
properties = new SortedList(appointmentItem.ItemProperties.Count);
foreach(Outlook.ItemProperty itemProp in
appointmentItem.ItemProperties)
{
properties.Add(itemProp.Name,itemProp.Value);
}
}
background to validate the information in a third party calender with
the outlook information however if I run the following when I get to
the "Body" propery it locks up.
itemProp.Name "Body" string
itemProp.Value error: cannot obtain value System.Object
This may also be related in that I cannot access an item using
OutlookNS.GetItemFromID(storeID,EntryID)
"A first chance exception of type
'System.Runtime.InteropServices.COMException' occurred in
outservice.exe
Additional information: Could not open the item. Try again."
even though I can access (most) of the informtion as follows
ClientQueue.Initialise();
System.Diagnostics.Debugger.Break();
// Create the Outlook application.
Outlook.ApplicationClass oApp = new Outlook.ApplicationClass();
// Get the NameSpace and Logon information.
// Outlook.NameSpace oNS =
(Outlook.NameSpace)oApp.GetNamespace("mapi");
Outlook.NameSpace OutlookNS = oApp.GetNamespace("mapi");
//Log on by using a dialog box to choose the profile.
//oNS.Logon( System.Reflection.Missing.Value,
System.Reflection.Missing.Value, true, true);
//Alternate logon method that uses a specific profile.
// TODO: If you use this logon method,
// change the profile name to an appropriate value.
//oNS.Logon("YourValidProfile", Missing.Value, false, true);
Outlook.MAPIFolder aFolder
= OutlookNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);
SortedList properties = new SortedList();
foreach(Outlook.AppointmentItem appointmentItem in aFolder.Items)
{
properties = new SortedList(appointmentItem.ItemProperties.Count);
foreach(Outlook.ItemProperty itemProp in
appointmentItem.ItemProperties)
{
properties.Add(itemProp.Name,itemProp.Value);
}
}