如何在.NET中的与会者日历中保存约会 [英] How to save appointments in attendee's calendar in .NET

查看:66
本文介绍了如何在.NET中的与会者日历中保存约会的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨大师,我想在vb.net/ c#.net中创建约会,并将它们放入指定用户的日历中。目前,我可以创建约会并将其保存到运行应用程序的本地计算机的Outlook日历中。我希望将约会保存到与会者的日历中。请帮忙。谢谢。



我的尝试:



Hi Gurus, I want to create appointments in vb.net/ c#.net and put them in to calendars of specified users. Currently I can create an appointment and save it into the outlook calendar of my local machine where the app is running. I want the appointment to be saved into the attendee's calendar. Please help. Thanks.

What I have tried:

Outlook.Application outlookApp = new Outlook.Application();
            Outlook.AppointmentItem appt = (Outlook.AppointmentItem)outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem);

            appt.Subject = "Testing";
            appt.Body = "Test Appointment body";
            appt.Location = "D";
            appt.Sensitivity = Outlook.OlSensitivity.olPrivate;
            appt.Start = DateTime.Parse("04/22/2016 08:00 AM");
            appt.End = DateTime.Parse("04/25/2016 08:00 AM");
            appt.ReminderSet = true;
             appt.RequiredAttendees = "xxx@xxxxx.co.za;";
            appt.Importance = Outlook.OlImportance.olImportanceHigh;
            appt.ReminderMinutesBeforeStart = 10;
            appt.Save();

推荐答案

您无法在代码中直接在其日历中创建约会。您将无法访问他们的日历,除非他们向您分享*非常不可能)并且您将没有模拟权限将约会放入他们的日历中。



您别无选择,只能在电子邮件中创建约会并将其发送给他们。这样他们就可以点击约会接受按钮并将其自己放入日历中。
You cannot create the appointment directly in their calendar from your code. You will NOT have access to their calendars unless they share it out to you *very unlikely) and you will NOT have impersonation permissions to put the appointments in their calendar either.

You have no choice but to create the appointment in an email and send it to them. That way they can just click on the appointment Accept button and put it in their calendar themselves.


这篇关于如何在.NET中的与会者日历中保存约会的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆