Retired for five years. I still lurk. I had a set of programs that compiled sales data, created excel pivot tables, and emailed them to the sales managers in the middle of the night. To get around the security issues I used "Click Yes", which at the time was free. Apparently it still is around and now costs something, but it I am sure is worth it if you need to do stuff like this.
http://www.contextmagic.com/express-clickyes/pro-version.htm
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Monday, November 30, 2015 9:16 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Sending email from Access
Hello Jim
Whilst I'm new to this, and there are members of the forum who will no doubt solve you problem easily, you post tempted me to reply.
I have code that allows a user to fire up Outlook, create an email, edit it and then send. It doesn't go into the Outbox first. Here it is (which is very similar to your post)
' Get a pointer to Outlook - late binding
Set objOL = CreateObject("Outlook.Application")
Set objMail = objOL.CreateItem(olMailItem)
objMail.Subject = strSubject
objMail.To = strTo
objMail.BodyFormat = olFormatHTML
objMail.Body = strMsg
objMail.Display
Set objMail = Nothing
Set objOL = Nothing
The only difference I can see is the use of CreateObject and the above doesn't use a With loop. If this works for you, great, though perhaps someone could explain why it works.
Best regards
Ray
Posted by: "Carolyn" <carolamrt@earthlink.net>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
Tidak ada komentar:
Posting Komentar