Email macro

sthack99

Board Regular
Joined
May 16, 2006
Messages
237
I have a macro that automatically saves the workbook I have open and then sends it as an attachment through email. The only problem I have with it is when it attemps to send the email, a message box appears saying "A program is trying to automatically send e-mail on your behalf. Do you want to allow this? 'Yes' or 'No'" Here's a copy of the code. Is there anyway to get around this? It's really annoying.

Sub SpecialSaveWarrantySheets()
'
' SpecialSaveWarrantySheets Macro
' Macro recorded 1/15/2007 by Peed User
'
' Keyboard Shortcut: Ctrl+Shift+S
'
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\sthackston\Desktop\Warranty Job Sheets\" & Range("B4").Value & "-" & Range("D4").Value & ".xls"
ActiveWorkbook.SendMail Recipients:="servicerequest@peedplumbing.com", ReturnReceipt:=True
ActiveWorkbook.Close

End Sub
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
FYI - I downloaded Outlook Redemption, but I don't know how to incorporate it into my script to bypass the security message. They say to add this:

dim SafeItem, oItem
set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an instance of Redemption.SafeMailItem
set oItem = Application.CreateItem(0) 'Create a new message
SafeItem.Item = oItem 'set Item property
SafeItem.Recipients.Add "somebody@somewhere.com"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Send

But I've tried that and it still isn't working. I must not be doing something right. Can anyone show me how to add this script to my script?
 
Upvote 0
i use "Advanced Security for Outlook 1.4"

you don't have to incorporate any special code into the vb or any files. just simply allows you to set the option to not warn about the file.

seems to work for me
 
Upvote 0
It's still giving me the annoying pop up. Was there something I was supposed to do after installing it?
 
Upvote 0

Forum statistics

Threads
1,222,415
Messages
6,165,894
Members
451,993
Latest member
rowebca

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top