next
10-12-2010, 02:35 PM
I have a script to send out emails through excel to people and so far I have several issues:
1) If I try to automatically send without displaying the message itself, I get a warning asking me to confirm that I actually want to do this. How do I remove this?
2) Sending email without displaying it first interprets CSS that I use to style the message as text, rather than code. This happens only if I send the message WITHOUT displaying it first. Is this a bug?
Here's a basic example of my code:
Sub Macro3()
Dim Outlook As Object, NewMail As Object
Set Outlook = CreateObject("Outlook.Application")
Set NewMail = Outlook.CreateItem(olMailItem)
With NewMail
.To = "xxx@xxx.com"
.subject = "my subject"
.BodyFormat = olFormatHTML
.HTMLBody = "message"
.Display
'.send
End With
End Sub
1) If I try to automatically send without displaying the message itself, I get a warning asking me to confirm that I actually want to do this. How do I remove this?
2) Sending email without displaying it first interprets CSS that I use to style the message as text, rather than code. This happens only if I send the message WITHOUT displaying it first. Is this a bug?
Here's a basic example of my code:
Sub Macro3()
Dim Outlook As Object, NewMail As Object
Set Outlook = CreateObject("Outlook.Application")
Set NewMail = Outlook.CreateItem(olMailItem)
With NewMail
.To = "xxx@xxx.com"
.subject = "my subject"
.BodyFormat = olFormatHTML
.HTMLBody = "message"
.Display
'.send
End With
End Sub