iknowu99
Well-known Member
- Joined
- Dec 26, 2004
- Messages
- 1,158
- Office Version
- 2016
The info i retrieved is from the following posts:
http://www.mrexcel.com/board2/viewtopic.php?t=281494
and
http://www.mrexcel.com/archive2/58500/67827.htm
When using redemption code the inbox receives it 10 minutes later. I have installed the redemption file and use Ivan's code:
now with
It is instantaneous, yet it gives me this annoying message that prevents automation
How to avoid this message and get immediate results?
http://www.mrexcel.com/board2/viewtopic.php?t=281494
and
http://www.mrexcel.com/archive2/58500/67827.htm
When using redemption code the inbox receives it 10 minutes later. I have installed the redemption file and use Ivan's code:
Code:
Sub MAIN()
Call EMailViaRedemption("myEmail", "C:\testing.xls")
End Sub
Private Sub EMailViaRedemption(strRecipAddr As String, strFileFullPathName As String)
Dim SafeItem As Object
Dim oItem As Object
Dim App As Object
Dim MyAttachments As Object
On Error GoTo EndProperly
Set App = CreateObject("Outlook.Application")
'// Create an instance of Redemption.SafeMailItem
Set SafeItem = CreateObject("Redemption.SafeMailItem")
'// Create a new message
Set oItem = App.CreateItem(0)
'// Now create the SafeItems
With SafeItem
.Item = oItem
.Recipients.Add strRecipAddr
.Recipients.ResolveAll
Set MyAttachments = .Attachments
MyAttachments.Add strFileFullPathName
.Subject = Now
.Send
End With
EndProperly:
Set SafeItem = Nothing
Set oItem = Nothing
Set App = Nothing
Set MyAttachments = Nothing
End Sub
now with
Code:
Sub MAIN()
EmailSingleSheetWithoutSaving
End Sub
Sub EmailSingleSheetWithoutSaving()
ActiveSheet.Copy
ActiveWorkbook.SendMail "MyEmail", Now
End Sub
It is instantaneous, yet it gives me this annoying message that prevents automation
A program is trying to automatically send e-mail on your behalf. Do you want to allow this?
If this is unexpected, it may be a virus and you should choose “No”
How to avoid this message and get immediate results?