![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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(); } } } |
Ads |
#2
|
|||
|
|||
![]()
Instead of an AppointmentItem try MeetingItem.
rog Galois wrote: 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(); } } } |
#3
|
|||
|
|||
![]()
Even then, a meeting request that has not been sent and received is not going to have Accept and Reject buttons.
Why not create a message with an iCalendar attachment? Or just display the appointment directly to the user without making them open it first? -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Rog" wrote in message ... Instead of an AppointmentItem try MeetingItem. rog Galois wrote: 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(); } } } |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook: inbox and sent items in one folder | vamail | Outlook - General Queries | 1 | April 4th 06 06:10 AM |
Can't view hotmail inbox in outlook 2002 | Pinhas | Outlook - General Queries | 1 | March 28th 06 11:34 AM |
How to automatically download to Outlook inbox from netzero inbox. | Very inexperienced Outlook user | Outlook - Installation | 2 | March 27th 06 01:07 AM |
Outlook 2002 quits when selecting Inbox. | K C | Outlook - Installation | 0 | January 28th 06 12:41 AM |
AppointmentItem question (2003) | Dana DeLouis | Outlook and VBA | 1 | January 18th 06 06:13 PM |