Note: The other languages of the website are Google-translated. Back to English

在Outlook中撰写电子邮件时,如何防止向CC和BCC收件人发送附件?

众所周知,在发送带有附件的电子邮件时,“收件人”,“抄送”或“密件抄送”字段中的所有收件人都将获得附件。 但是,某些用户只希望将附件发送给“收件人”收件人,而“ CC”和“ BCC”收件人则只收到没有附件的邮件。 您如何在Outlook中解决这项工作?

使用VBA代码编写电子邮件时,防止向CC和BCC收件人发送附件


使用VBA代码编写电子邮件时,防止向CC和BCC收件人发送附件

实际上,Outlook没有提供处理此任务的选项,但是,以下VBA代码可以帮您一个忙,请这样做:

1。 按住 ALT + F11 键打开 Microsoft Visual Basic应用程序 窗口。

2。 在 Microsoft Visual Basic应用程序 窗口,双击 本次展望会议 来自 Project1(VbaProject.OTM) 窗格以打开模式,然后将以下代码复制并粘贴到空白模块中。

VBA代码:防止向CC和BCC收件人发送附件:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim xMailItem As Outlook.MailItem
Dim xNewMail As Outlook.MailItem
If Item.Class <> olMail Then Exit Sub
Set xMailItem = Item
Set xNewMail = Outlook.Application.CreateItem(olMailItem)
With xNewMail
    .CC = xMailItem.CC
    .BCC = xMailItem.BCC
    .Subject = xMailItem.Subject
    .HTMLBody = xMailItem.HTMLBody
    .Send
End With
xMailItem.CC = ""
xMailItem.BCC = ""
End Sub

doc cc without attachment 1

3. Then save and close the code window.

4. From now on, when sending an email with attachments, only the recipients in To field can receive the attachments, and the recipients in CC and BCC can only get the message without attachments.


Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!

  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
  • Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
  • Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121
 
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL