User-defined type not defined for AppointmentItem in Excel

房东的猫 提交于 2019-12-02 11:28:11

There are four prerequisite steps listed in that article. They are listed right before the code block.

You probably forgot to follow the step two, Adding a reference to Outlook object library.
The only difference is, in VBA the menu item is under Tools, not Project.

You need to refer to all constants by their value, so, as olAppointmentItem = 1 :

 Set olAppt = olApp.CreateItem(1)

You can either look up values, for example http://msdn.microsoft.com/en-us/library/aa911356.aspx, or use Outlook's Object Browser to get the values.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!