-
email + no pop up warning message?
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:
[VBA]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[/VBA]
-
-
Should you be locked out of CDO, there is a product called Outlook Redemption which avoids the warning. It must be installed on all systems that use the code however. http://www.dimastr.com/redemption/
-
This is perfect, thank you.
-
Hmm, I get compile error: "expected: =".
here's how I use it:
[VBA] CDOMail_SendMessage (SendTo:=crew.Email, SendCC:="", SendBCC:="", _
From:="Accounting", ReplyTo:="DoNotReply@cleanway.com", _
Subject:="Subject", BodyHTML:="body", BodyPlain:="")[/VBA]
Does anyone know why?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules