在Outlook中如何?自動CC

來源:互聯網
上載者:User

1. 在Outlook裡面鍵入ALT+F11開啟VBA編輯器;

2、鍵入CTRL+R啟用左邊的那個工程面板,展開並雙擊上面的“Project (VbaProject.OTM)\Microsoft Office Outlook 對象\ThisOutlookSession”;

3、將下面的代碼粘貼到右邊開啟的編輯區裡面去:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim objRecip As Recipient
Dim strMsg As String
Dim res As Integer
Dim strcc As String
On Error Resume Next

strcc = "yourmail@mail.com"

Set objRecip = Item.Recipients.Add(strcc)
objRecip.Type = olCC
If Not objRecip.Resolve Then
       strMsg = "不能解析抄送人郵件地址, " & _
                "請確認是否仍然發送郵件?"
       res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
            "不能解析抄送人郵件地址")
       If res = vbNo Then
         Cancel = True
       End If
End If

Set objRecip = Nothing

End Sub

 

4、鍵入CTRL+S儲存,再鍵入ALT+Q退出VBA編輯器返回Outlook主介面;

6、選擇菜單“工具-信任中心”,在快顯視窗中選擇“宏安全性”;

7、選擇“為所有宏提供警告”

8、重新啟動Outlook,看到提示是否否用宏,選擇啟用。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.