Solved

warning message before sending email with excel file

Posted on 2014-03-10
4
269 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 48

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 48

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 48

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

Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

Join & Write a Comment

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
how to add IIS SMTP to handle application/Scanner relays into office 365.
This video discusses moving either the default database or any database to a new volume.

760 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

19 Experts available now in Live!

Get 1:1 Help Now