简体   繁体   English

在特定 outlook 日历上创建新约会

[英]Create new appointment on specific outlook calendar

I'm looking for Outlook VBA code that will create a new task on a specific outlook calendar???我正在寻找 Outlook VBA 代码,它将在特定的 outlook 日历上创建一个新任务??? For example, when I run the macro a new task opens.例如,当我运行宏时,会打开一个新任务。 When I click "save", it will add the task to my non-default calendar "Notes/Tasks/Reminders".当我点击“保存”时,它会将任务添加到我的非默认日历“笔记/任务/提醒”中。

You need to get the target calendar folder and then use the Items.Add method to create a new appointment there.您需要获取目标日历文件夹,然后使用Items.Add方法在那里创建一个新约会。 Read more about all possible ways in the How To: Create a new Outlook Appointment item article.在操作方法:创建新的 Outlook 约会项目文章中阅读有关所有可能方式的更多信息。

Dim appItem as Outlook.AppointmentItem
Dim items as Outlook.Items
Set items = yourCalendarFolder.Items
Set appItem = items.Add(olAppointmentItem)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM