VBA 使用Outlook发送邮件是,怎么取消掉高优先级?
求教,使用如下VBA代码实现了自动发送邮件,但是发出去的邮件都自带高优先级,请问用什么办法可以取消掉这个高优先级?谢谢!PublicSubSendMail(StrToAs...
求教,使用如下VBA代码实现了自动发送邮件,但是发出去的邮件都自带高优先级,请问用什么办法可以取消掉这个高优先级?
谢谢!
Public Sub SendMail(StrTo As String, StrCC As String, StrSubject As String, StrBody As String, Optional StrAttach As String)
Dim otlk As Outlook.Application
Dim mailitem As Outlook.mailitem
On Error GoTo Errhandle
Set otlk = New Outlook.Application
Set mailitem = otlk.CreateItem(olMailItem)
With mailitem
.To = StrTo
.CC = StrCC
.Importance = olImportanceHigh
.Subject = StrSubject
.Body = StrBody
If Len(StrAttach) <> 0 Then .Attachments.Add StrAttach
.Send
'Do Until mailitem.Sent = True
' DoEvents
'Loop
End With
MsgBox "邮件已发送,请注意查收!"
Exit Sub
Errhandle:
MsgBox Err.Description, , "错误报告"
End Sub 展开
谢谢!
Public Sub SendMail(StrTo As String, StrCC As String, StrSubject As String, StrBody As String, Optional StrAttach As String)
Dim otlk As Outlook.Application
Dim mailitem As Outlook.mailitem
On Error GoTo Errhandle
Set otlk = New Outlook.Application
Set mailitem = otlk.CreateItem(olMailItem)
With mailitem
.To = StrTo
.CC = StrCC
.Importance = olImportanceHigh
.Subject = StrSubject
.Body = StrBody
If Len(StrAttach) <> 0 Then .Attachments.Add StrAttach
.Send
'Do Until mailitem.Sent = True
' DoEvents
'Loop
End With
MsgBox "邮件已发送,请注意查收!"
Exit Sub
Errhandle:
MsgBox Err.Description, , "错误报告"
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询