Link Excel to Outlook 2003 Email
Hi,
I need a help: I created the code to send as e-mail addresses that will be added in the list. The code is functioning normally, but the only problem is that each sending a message:
Code:
Sub Email_var1()
Dim text As String
Dim name As String
Dim order As Long
end = Plan1.UsedRange.Rows.Count
name = Left (ActiveWorkbook.Name, Len (ActiveWorkbook.Name) - 4)
For line = 1 To order
text = Plan1.Cells (lin, 2). Value
ActiveWorkbook.SendMail Recipients: = text, Subject: = name
Next
End Sub
Quote:
Error Message: Program trying to send mail on your behalf. If this is unexpected, click deny and make sure your antivirus software is updated.
For information about the security of email and how to avoid this warning, click Help.
Allow Deny Help
I click help and I find no guidelines on how to disable this warning. Have tried on various internet forums.
Could someone help me?
Thanks!
Re: Link Excel to Outlook 2003 Mail
I found a code on the internet that met your needs and I am providing below so that others who need to use.
Code:
Sub Email_var1()
Dim insert As String
Dim order As Long
end = Plan1.UsedRange.Rows.Count
insert Plan1.Cells = (2, 1)
For row = 3 To order
insert = insert & "" & Plan1.Cells (line, 1)
Next line
Set oOutlookApp = CreateObject ( "Outlook.Application")
Set oOutlookMessage = oOutlookApp.CreateItem (0)
With oOutlookMessage
. Subject = "TEST SHIPPING"
. To = insert
. display
Set = oOutlookMessage.Attachments Annex
anexo.Add "C:\Documents and Settings\user name\Desktop\PID OESTE.XLS CENTER",olByValue,1,"Test"
. Send
End With
End Sub
Re: Link Excel to Outlook 2003 Mail
A new question and found no answer ... which command should I add to this code so that after the message, the signature is added to HTML that I have within Outlook?
If you can help me, thank you!
Re: Link Excel to Outlook 2003 Mail
I think your problem is not with the code or with Excel. The problem is with your e-mail program. If Outlook Express, for example, go to Tools/Options/Security
there you will see that is empowered to: "Warn when a program attempts to send email "
Excel To send your e-mail this icon must be disabled.
If your e-mail program is another you will have to find this option there and disable it with certainty that the "default" will stop sending it (security).