473,396 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Send a flag from Outlook 2013 to Access 2013 confirming that email was sent (exists i

I would like to add a flag which verify that the email was sent or at least is in the Sent Outlook folder to the following vba code.

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdEmail1_Click()
  2. Dim OutApp As Outlook.Application
  3. Dim OutMail As Outlook.MailItem
  4. Dim strbody As String
  5.  
  6. Set OutApp = CreateObject("Outlook.Application")
  7. Set OutMail = OutApp.CreateItem(olMailItem)
  8.  
  9. strbody = "Dear Aaron," & vbNewLine & "Enclosed is the requested information"
  10.  
  11. On Error Resume Next
  12. With OutMail
  13.     .To = "drnorbert@msn.com"
  14.     .CC = ""
  15.     .BCC = ""
  16.     .Subject = "Important..."
  17.     .Body = strbody
  18.     .SendUsingAccount = OutApp.Session.Accounts.Item(2)                         '2nd email
  19.     .Send
  20. End With
  21. On Error GoTo 0
  22.  
  23. Set OutMail = Nothing
  24. Set OutApp = Nothing
  25. End Sub
  26.  
Thanks
Norbert
Aug 6 '15 #1
0 1500

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to...
2
by: Danny J. Lesandrini | last post by:
Our orders database exists inside our firewall but we have a web site hosted on an ISP server. If we wanted to give users the ability to query the status of their order in real time, we could just...
3
by: DotNetGruven | last post by:
System.Web.Mail.SmtpMail.SmtpServer = "10.50.7.160"; System.Web.Mail.SmtpMail.Send(mailMessage.From, mailMessage.To, mailMessage.Subject, mailMessage.Body); What could cause this exception...
2
by: chuckdfoster | last post by:
I am getting a "Could Not Access CDO.Message Object" Error when I try to use the following code to send an email via ASP.NET. When I run this on one machine it works, on another one it doesn't. ...
6
by: monomaniac21 | last post by:
hi all how can u send a plain text version of an email with the html so that the users mail client can access this plain text version? kind regards marc
5
by: trig | last post by:
Please help! I am an ICT teacher at a secondary school and my year 12 (AS Level) group need to create a website where data can be sent from a form to a Microsoft Access database. I am trying...
6
by: dlblack | last post by:
I am using the following code to send emails with attachments from Access using Outlook. The code works fine if Outlook is already open and emails are sent as expected via Outlook. When Outlook is...
0
by: TimeTT | last post by:
I have a problem with an add-in I support when "Send immediately when connected" is unchecked. The add-in is causing the first email sent to sit permanently in the Outbox. This email has Date as None...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.