Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

How to store appointment id or itemid and then later how can I use to delete the appointment by using the itemid using C#

$
0
0

private void button2_Click(object sender, EventArgs e)
{
try
{

ExchangeService service = new ExchangeService();
string username = mycompany+ "\\" + "usersid";
service.Credentials = new WebCredentials(username, "myusername"); 
service.AutodiscoverUrl("myname@mycompany.com");
Appointment appointment = new Appointment(service);
appointment.Subject = "Testing Holiday";
appointment.Start = DateTime.Now;
appointment.End = appointment.Start.AddHours(1);
appointment.Save();
}

catch (Exception ex)
{

console.writeline("following error occurred: " + ex.Message);
}
}

How to store appointment id or itemid and then later how can I use to delete the appointment by using the itemid  . Please give an example to write the code in C#


polachan


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>