Windows 10 已导致 VBA MailItem 运行-time 错误
Windows 10 has caused VBA MailItem run-time error
我刚刚更新到 Windows 10
,现在来自 Excel sheet 的以下 VBA code
会导致 运行-time 错误:
Dim aOutlook As Object
....
Set aOutlook = CreateObject("Outlook.Application")
Set aEmail = aOutlook.CreateItem(0)
aEmail.To = "emailaddress"
运行-时间错误'-2147417851 (80010105)':
对象“_MailItem”的方法 'To' 失败
Excel 2003 和 Excel 2013 是一样的。谁能建议需要做些什么来解决这个问题?
我已经找到了错误的原因,尽管我不太清楚为什么 Excel 会像这样:
我刚刚更新到 Windows 10
,现在来自 Excel sheet 的以下 VBA code
会导致 运行-time 错误:
Dim aOutlook As Object
....
Set aOutlook = CreateObject("Outlook.Application")
Set aEmail = aOutlook.CreateItem(0)
aEmail.To = "emailaddress"
运行-时间错误'-2147417851 (80010105)': 对象“_MailItem”的方法 'To' 失败
Excel 2003 和 Excel 2013 是一样的。谁能建议需要做些什么来解决这个问题?
我已经找到了错误的原因,尽管我不太清楚为什么 Excel 会像这样: