Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / February 2008

Tip: Looking for answers? Try searching our database.

Create Email From Access W/Information From Form or Query in

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mmatzke@comcast.net - 19 Feb 2008 20:11 GMT
I have designed Databases for many years now, but never attempted this:

I need to know how to create an email with information located in the active
form or off of a query. I would like to have the email automatically
generated with the To Address, The Subject Line and the Body of the Text. I
would like that email to open but not to send until the operator has a chance
to make modifications. (one record per email).
Signature

Mark Matzke

Maurice - 19 Feb 2008 20:43 GMT
Hi Mark,

You could try the following to start:

Place a button on a form and place the following behind the on click event

Dim objApp as New Outlook.Application
Dim objMail as Outlook.MailItem
Dim objRecipient as Object

Set objApp =CreateObject(“Outlook.Application”)
Set objMail = objApp.CreateItem(olMailItem)

With objApp.CreateItem(olMailItem)
   .recipients.add ([Your field here]) '-> could be the textbox on the form
   .cc=”[your field here]” '-> in case of multiple like this "a;b;c" where
a = name of
                                         cc, b=name of cc and so on
   .subject=[Your field here] '-> or subject between " "
   .body = “bodytext of mail” '-> or [your field]
   .attachments.add etc……
   .display ‘-> If you want to see it
   .send ‘-> if you want to send it.

End With

Remember when using Outlook automation from Access when trying to send mail
you will get a warning stating someone is trying to send mail do you wis to
continue. This is an Outlook security issue and must be solved with
redemption. Look for the thread in this NG where this has been discussed
before.

hth
Signature

Maurice Ausum

> I have designed Databases for many years now, but never attempted this:
>
[quoted text clipped - 3 lines]
> would like that email to open but not to send until the operator has a chance
> to make modifications. (one record per email).
mmatzke@comcast.net - 19 Feb 2008 21:17 GMT
That totally makes sense, but this is a working system in use, I will try
this overnight.  Thanks so much!
Signature

Mark Matzke

> Hi Mark,
>
[quoted text clipped - 37 lines]
> > would like that email to open but not to send until the operator has a chance
> > to make modifications. (one record per email).
Maurice - 19 Feb 2008 21:24 GMT
Cheers ;-)
Signature

Maurice Ausum

> That totally makes sense, but this is a working system in use, I will try
> this overnight.  Thanks so much!
[quoted text clipped - 40 lines]
> > > would like that email to open but not to send until the operator has a chance
> > > to make modifications. (one record per email).
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.