[英]How to classify e-mail in Outlook before sending from Excel
I've got a macro in Excel that send e-mail through Outlook and it works perfectly.我在 Excel 中有一个宏,可以通过 Outlook 发送电子邮件,并且运行良好。 But in my company they recently added an e-mail classification.
但是在我的公司,他们最近添加了电子邮件分类。 Can I insert on my code?
我可以插入我的代码吗?
Example: If send 2.000 e-mails at once, I'll have to click 2.000 times on any of the classification button.示例:如果一次发送 2.000 封电子邮件,我将不得不在任何分类按钮上单击 2.000 次。
The language is in Portuguese (Brazil), so by order is: Confidential, Reserved, Internal, Public.语言是葡萄牙语(巴西),所以按顺序是:机密、保留、内部、公共。
Classification:分类:
Sub ContatoAtivo()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim OutlookApp As Object
Dim OutlookMail As Object
Dim xTexto As String
Dim Texto As String
Dim X, Y, Z As Integer
Dim Email As String
Dim Assunto As String
Dim Qtd As Integer
Dim rng As Range
Qtd = Planilha2.ListObjects(1).DataBodyRange.Rows.Count
For X = 1 To 1
Email = Planilha2.Cells(X + 6, 8).Value
Subject = Planilha3.Cells(11, 1).Value
If Email <> "" Then
Set rng = Nothing
Set rng = Planilha3.Range("E12:F22").SpecialCells(xlCellTypeVisible)
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
Text = "Test"
With OutlookMail
.To = "test.test@test.com.br"
.CC = ""
.BCC = ""
.Subject = Planilha3.Range("A5").Value & " | " & Subject
.HTMLBody = Text
'.Display
.Send
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
Texto = ""
End If
Next X
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Thanks!谢谢!
These controls belong to the Azure Information Protection add-in.这些控件属于 Azure 信息保护加载项。 Unfortunately, Office (nor VBA or VSTO) doesn't provide any trivial way for customizing a custom UI or dealing with it.
不幸的是,Office(也不是 VBA 或 VSTO)没有提供任何用于自定义自定义 UI 或处理它的简单方法。 Your options are listed below:
您的选择如下:
idMso
parameter.idMso
参数标识的idMso
。 You must find the ID of controls you need to launch programmatically. Anyway, I'd suggest contacting AIP add-in developers.无论如何,我建议联系 AIP 插件开发人员。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.