Solved

warning message before sending email with excel file

Posted on 2014-03-10
4
273 Views
Last Modified: 2014-03-26
Hi Everyone,

We are looking for a solution where an employee is sending out an email to external party with excel file attached and they should get a pop up question "Are you sure you would like to send this email with excel file"

We have exchange 2007 and would like to know if there is third party software or exchange has this type of feature. Please let me know as we need this asap.

Thanks
0
Comment
Question by:skyjumperdude
  • 3
4 Comments
 
LVL 49

Expert Comment

by:Rgonzo1971
ID: 39918238
Hi,

I know about this one but you cannot discriminate sending an email with or without attachments as far as I know.

http://www.safesendsoftware.com/get-it.html

Regards
0
 
LVL 49

Expert Comment

by:Rgonzo1971
ID: 39918277
Hi,

this code would probably do it

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim intRes As Integer
Dim strMsg As String

bExcelAttachment = False
Set myAttachments = myItem.Attachments
'if there are some...
If myAttachments.Count > 0 Then
    For i = 1 To myAttachments.Count
        If myAttachments(i).DisplayName Like "*.xls*" Then ' is Excel file
            bExcelAttachment = True
            Exit For
        End If
    Next i
End If
If bExcelAttachment = True Then
    strMsg = "Are you sure that you would like to send this email with excel file?"
    intRes = MsgBox(strMsg, vbYesNo + vbDefaultButton1, "Confirm Send ")
    If intRes = vbNo Then
        Cancel = True
    End If
End If
End Sub

Open in new window

Regards
0
 
LVL 1

Author Comment

by:skyjumperdude
ID: 39918414
Hi Rgonzo1971,

Thank you for your quick response. What do you mean by "I know about this one but you cannot discriminate sending an email with or without attachments as far as I know."?

Where would I insert that code?
0
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39919774
Hi,

the code should be entered in the ThisOutlook Module with Alt-F11 and the Security level should be at medium, (ask before running Macros)

for a mor detailed description on how see
http://www.slipstick.com/developer/how-to-use-outlooks-vba-editor/

Regards
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
This video discusses moving either the default database or any database to a new volume.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now