下面是 Excel 宏的开头。我始终收到消息
"Object doesn't support this property or method.
Sub RegisterAppointmentList(CName As String)
' adds a list of appontments to the Calendar in Outlook
Dim olApp As Outlook.Application
Dim olApptItem As Outlook.AppointmentItem
Set olApp = GetObject("", "Outlook.Application")
Set olApptItem = Application.CreateItem(olAppointmentItem)
On Error Resume Next
最佳答案
换行
Set olApptItem = Application.CreateItem(olAppointmentItem)
至
Set olApptItem = olApp.CreateItem(olAppointmentItem)
关于excel - 在 Excel 应用程序中创建 Outlook 项目会生成错误 : "Object doesn' t support this property or method",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65974681/