473,666 Members | 2,144 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send Email from Access Using a custom Outlook Form

I know how to send email from Access and I know how to create a custom
form in Outlook. but.... How do I put the email info from Access into
the Outlook custom form ???

Dim MyDB As Database
Dim MyRS As Recordset
Dim objOutlook As Outlook.Applica tion
Dim objOutlookMsg As Outlook.MailIte m
Dim objOutlookRecip As Outlook.Recipie nt
Dim objOutlookAttac h As Outlook.Attachm ent
Dim TheAddress As String

Set MyDB = CurrentDb
Set MyRS = MyDB.OpenRecord set("Select * from tblMailingList Where
responded <>-1")
MyRS.MoveFirst

' Create the Outlook session.
Set objOutlook = CreateObject("O utlook.Applicat ion")
Do Until MyRS.EOF
' Create the e-mail message.

Set objOutlookMsg = objOutlook.Crea teItem(olMailIt em)
TheAddress = MyRS![emailaddress]
If MyRS!responded <-1 Then
With objOutlookMsg
' Add the To recipients to the e-mail message.
Set objOutlookRecip = .Recipients.Add (TheAddress)
objOutlookRecip .Type = olTo

If TheAddress = "Jo******@somew here.com" Then

.Subject = "Only " & [daysleft] & " Days Left Till Your
Report Is Due !"
.Body = " John," & _
"You have " & [daysleft] & " days remaining to
submit the your updates!"
.Importance = olImportanceHig h
Else

' Set the Subject, the Body, and the Importance of the e-mail
message.
.Subject = "***MANDATO RY RESPONSE REQUIRED***"

.Body = "BLAH BLAH BLAH BLAH" & _
"Thank you for help."
.Importance = olImportanceHig h 'High importance

'Resolve the name of each Recipient.
End If

For Each objOutlookRecip In .Recipients
objOutlookRecip .Resolve
If Not objOutlookRecip .Resolve Then
objOutlookMsg.D isplay
End If
Next

.Display
'.Send
End With
End If
MyRS.MoveNext

Loop

Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub

Suggestions ???

Aug 10 '06 #1
1 5951

Mr T wrote:
I know how to send email from Access and I know how to create a custom
form in Outlook. but.... How do I put the email info from Access into
the Outlook custom form ???

Suggestions ???
Sure. Check the Outlook NG. Essentially what you're saying is that
"this is an Outlook problem". It's not that I'm trying to put you off,
but the likelihood of finding someone who knows enough about Outlook
forms to help you in that NG is much higher than it is here.

Aug 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
12076
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 use PHP to get inside an OWA (Microsoft Outlook Web Access) website to send email that way? The reason I ask is because my corporate office is going to do away with our rogue SMTP server access and force everything through Exchange
0
3696
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after days of reading posts and testing, I see it is not - unless I'm missing something? I'm not an email guru. All of my users will be running at least Windows 2000, most on XP sp2. Some of my users will have Outlook, many will be using Outlook...
1
5336
by: Jay McGrath | last post by:
Help - trying to send a simple text email with with as little user intervention. I am trying to create a button in my Access application that will automatically send a simple text email. It works except that I have two warning nuisances: 1) Program is trying to access email Addresses you have stored in Outlook. Allow access for ... 2) A program is trying to automatically send email on your behalf ... Heck, I am only trying to a send...
1
8214
by: KS | last post by:
Hi, I have creatd a custom Outlook form with a few custom form fields. When completed the form is sent to me and goes into my Inbox. This works fine. Now Iam trying to write some code in Access to import l;oop though my inbox and pick up all the usesr defined field data from any messages froma specific subject. I have have mixed and matched some code I found on the net however it doesn't seem to work properly. problems I face are:
3
2094
by: icsupt via AccessMonster.com | last post by:
I would like to send an email from Access. I copied the code from another free website, but it does not do everything I need it to do. I have a series of checkboxes: checkbox1 - when checked, I want to display orange checkbox2 - when checked, I want to display apples checkbox3 - when checked, I want to display grapes If all three checked, I want to display in one column: orange apples
10
24382
by: Mike Charney | last post by:
Is there a simple way to send SMTP email from Access VBA? Mike m charney at dunlap hospital dot org
17
7636
by: rdemyan | last post by:
My app creates a building report. My users have requested that I provide functionality to e-mail these "building reports" to building managers once a month. So assuming that I have the following table that lists a building manager's name, e-mail address and their building, is there a way that I can automate this to send these monthly e-mails from Outlook. Ideally this would be a click one button type of action:
1
2826
by: pixie | last post by:
Hi. Access 2003. The database stores contract information. I have a query for each person that is responsible for contracts. The query checks to see if there are reports due either this week, next week, or in three week. A report is created for each query but if the report has no data, it is not saved. I have a button on a form that will run code to automatically send each person their own report. If a person doesn't have a report, the...
3
5642
by: jubergolandaj | last post by:
I am working on Outlook Addin developed in C# and VS-2008. In this we are having our own custom form .oft On this form we have our custom “Send” button on click event of it our processing continues. Now the problem we are facing is we want to disable or hide the built-in send button of Outlook on the Ribbon. Also we want to disable or hide some groups in the Tabs on Ribbon. We have tried to do this by using custom Ribbon class...
0
8444
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8869
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8781
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1775
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.