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
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