Click here to Skip to main content
13,006,360 members (78,423 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I develop Add-ins for my outlook that archive emails.
and I want to ask the sender when he send email with attachments if he want to send the attachments to the CC's Or not.
how to proceed this action?
Please Help.

Here is the code that proceed the outlook item:
Private Sub Application_ItemSend(ByVal Item As Outlook.MailItem, ByRef Cancel As Boolean) Handles Application.ItemSend
    GetMessageID_NEW(Nothing, Item, Item, "OUTGOING")
    If Item.Attachments.Count > 0 Then
        If Not Item.CC Is Nothing Then
            If MessageBox.Show("Do you want to send the attachments to CC(s)?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
                ' What should I write here?
             End If
        End If
     End If
End Sub
Posted 26-Jan-13 20:40pm
Updated 27-Jan-13 2:35am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is nothing is mail standards about it. If you want to ask anyone about anything, just do it. But CC is a separate header with just address(es). If your mail message has "attachments", it will be sent to CC addresses as well. Note, that nothing is actually "attached". "Attachment" is nothing but a "part" in a multi-part message. As the whole message is sent somewhere, it is sent as a whole.

Please see:[^].

maleksafadi 27-Jan-13 3:08am
How do I proceed this action?
How to send the attachment to all Recipients in TO(s) without sending it to CC(s)?
I just answered. You cannot.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

After deep search there is no solution only to send two emails.

Thanks all.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

You cannot send attachments to selective recipients. The only way to accomplish that is to send the original attachment email to the people who need the attachment, then create a second email that doesn't have the attachment and send that to the people that don't get the attachment. The problem with this is that the two groups of people are now no longer part of the same email chain and replies to those emails will not go to everyone.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100