创建特定日历的约会.VBA展望 [英] Creating an appointment to a specific calendar. VBA outlook

查看:39
本文介绍了创建特定日历的约会.VBA展望的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建宏以创建另一个日历的约会.我正在使用的当前宏会创建到我的默认日历.预先感谢.

How do i create a macro to create an appointment to another calendar. The current macro i am using creates to my default calendar. Thanks in advance.

Sub test()

Dim myItem As Object
Set myItem = Application.CreateItem(olAppointmentItem)
myItem.MeetingStatus = olMeeting
myItem.Subject = "Strategy Meeting"
myItem.Location = "Conf Rm All Stars"
myItem.Start = #4/11/2016 1:30:00 PM#
myItem.Duration = 10
myItem.Display

End Sub

推荐答案

调用 Application.Session.CreateRecipient ,然后将返回的 Recipient 对象传递给 Application.Session.GetSharedDefaultFolder .然后,您可以调用 MAPIFolder.Items.Add 添加新约会.

Call Application.Session.CreateRecipient, then pass the returned Recipient object to Application.Session.GetSharedDefaultFolder. You can then call MAPIFolder.Items.Add to add a new appointment.

这篇关于创建特定日历的约会.VBA展望的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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