G
Galois
I'm trying to create an AppointmentItem in the Inbox, so the user could
choose if to accept invitation or not, but Outlook 2002 refuses to do
so.
Anyone knows how to do that?
Code sample, C# (doesn't work - keeps a copy in the Draft folder & and
places the appointment in the calendar), open Outlook before running
this code:
using System;
using System.IO;
using System.Net;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Outlook.ApplicationClass app
= new Outlook.ApplicationClass();
Outlook.NameSpace session
= app.GetNamespace("MAPI");
session.Logon(null, null, null, null);
Outlook.MAPIFolder inbox
= session.GetDefaultFolder
(Outlook.OlDefaultFolders.olFolderInbox);
Outlook.AppointmentItem item
= (Outlook.AppointmentItem)inbox.Items.Add
(Outlook.OlItemType.olAppointmentItem);
item.Subject = "Subject";
item.Body = "Body";
item.Location = "Location";
item.ReminderSet = false;
item.Move(inbox);
item.Close(Outlook.OlInspectorClose.olSave);
session.Logoff();
}
}
}
choose if to accept invitation or not, but Outlook 2002 refuses to do
so.
Anyone knows how to do that?
Code sample, C# (doesn't work - keeps a copy in the Draft folder & and
places the appointment in the calendar), open Outlook before running
this code:
using System;
using System.IO;
using System.Net;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Outlook.ApplicationClass app
= new Outlook.ApplicationClass();
Outlook.NameSpace session
= app.GetNamespace("MAPI");
session.Logon(null, null, null, null);
Outlook.MAPIFolder inbox
= session.GetDefaultFolder
(Outlook.OlDefaultFolders.olFolderInbox);
Outlook.AppointmentItem item
= (Outlook.AppointmentItem)inbox.Items.Add
(Outlook.OlItemType.olAppointmentItem);
item.Subject = "Subject";
item.Body = "Body";
item.Location = "Location";
item.ReminderSet = false;
item.Move(inbox);
item.Close(Outlook.OlInspectorClose.olSave);
session.Logoff();
}
}
}