创建 Outlook 项目
此过程使用 Click 事件调用 CreateItem 以在用户单击 CommandButton1 时创建和显示约会。 本示例演示如何使用 VBScript 在自定义窗体页中执行此操作。
在设计模式下:
使用 "控件工具箱",将 CommandButton 放置到窗体上。
打开脚本编辑器。 如何操作?
输入以下代码,使用 OlItemType 枚举中的适当常量值指定要创建的项目类型。
Sub CommandButton1_Click
Application.CreateItem(1).Display
End Sub
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:提交和查看相关反馈