/ / inserendo l'appuntamento di outlook usando c #, asp.net - c #, asp.net, .net, outlook

inserendo l'appuntamento di prospettiva usando c #, asp.net - c #, asp.net, .net, outlook

Sto cercando di inserire un appuntamento in un utentecalendario, Posso tranquillamente inserire il mio utilizzando Microsoft.Office.Interop.Outlook.Application (sotto), quindi aggiungi l'utente come destinatario, ma cosa succede se non desidero aggiungermi, se voglio solo aggiungerne altri? Questo può essere fatto in modo simile?

Grazie

            Microsoft.Office.Interop.Outlook.Application app = null;
Microsoft.Office.Interop.Outlook.AppointmentItem appt = null;
app = new Microsoft.Office.Interop.Outlook.Application();

appt = (Microsoft.Office.Interop.Outlook.AppointmentItem)app.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
appt.Subject = "Meeting ";
appt.Body = "Test";
appt.Location = "a room";
appt.Start = Convert.ToDateTime("08/08/2012 05:00:00 PM");
appt.Recipients.Add("a@b.com");
appt.End = Convert.ToDateTime("08/08/2012 6:00:00 PM");
appt.ReminderSet = true;
appt.ReminderMinutesBeforeStart = 15;
appt.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh;
appt.BusyStatus = Microsoft.Office.Interop.Outlook.OlBusyStatus.olBusy;
appt.Save();

risposte:

6 per risposta № 1

Non è possibile (o non dovrebbe) utilizzare l'API di Outlook da un'applicazione ASP.NET. Invece Exchange Server fornisce a SDK dei servizi Web che ti consente di interagire con Exchange Server. La documentazione ha un esempio di come per creare appuntamenti nella casella postale di un utente.

Potrebbe essere necessario delegare l'accesso all'account utente utilizzato per eseguire la richiesta ASP.NET per riuscire a interagire con l'API di Exchange Server.

EWS è stato introdotto per la prima volta in Exchange 2007. Per le versioni precedenti di Exchange è possibile utilizzare Collaboration Data Objects (CDO). L'SDK di Exchange 2003 contiene la documentazione su come creare appuntamenti e richieste di riunione.