Set olMessage = olApp.CreateItem(olMailItem) olMessage.To = strEmailTo olMessage.CC = strEmailCC olMessage.Subject = strSubject olMessage.Body = strBody olMessage.Importance = olImportanceHigh olMessage.Sensitivity = olConfidential olMessage.Display ' Line With Error
上面的代码在我的用户表单上的一个按钮内。错误说
一个对话框打开。关闭它并重试
当我将任一代码单独放在宏中时,它可以正常工作并打开一封新电子邮件等,但是当我将宏设置为加载用户表单并将代码放在命令按钮下时,它会给出一个错误对话框:
Run-time error '2147467259 (80004005)'
A dialog box is open. Close it and try again.
Outlook 已打开,并且宏位于工具栏上。
模块 1(代码)
sub email()
Load userform3
userform3.show
end sub
加载我的菜单很好