Create button or automatic link

  • Thread starter Thread starter DougL
  • Start date Start date
D

DougL

I'm sending out an email and I want to insert a button, or even a hyperlink
that if someone clicked on it, it would automatically generate a new email
with a predefined email address in it.

As an example, say I was asking people to click on a button if they didn't
have a car, and when they clicked on it, a new email with (e-mail address removed)
popped up.

How can I do this?
Thank you
 
Hi Doug

This is a copy of an answer I gave a while ago which is simlar to yours.
Hope it helps.

Also have a look at this link - an answer given by Sandra Daigle MVP

http://groups.google.com/group/micr...roup:microsoft.public.access#700171a7d6444ffa


___________________________________________

If sending report attached to the same e mail addresses all the time

Private Sub ButtonName_Click()
DoCmd.SendObject acReport, "Name of report here", "RichTextFormat(*.rtf)",
"(e-mail address removed)", "(e-mail address removed)", "", "Hey - our machine is
broken", "Please will you come and fix our machine as soon as possible.
Thanks", False, ""
End Sub


Or


DoCmd.SendObject acReport, "Labels Jackets_Orders",
"RichTextFormat(*.rtf)", "(e-mail address removed);[email protected]", "", "",
"Hey - our machine is broken", "Please will you come and fix our machine as
soon as possible. Thanks", False, ""


If sending the mail to addresses shown in 2 controls on the form (where the
CC may or may not be empty) - I use the If Not IsNull to stop the errors
caused by the empty address in the code in outllook


Private Sub ButtonName_Click()
If Not IsNull(Me.CCMailAdress) Then
DoCmd.SendObject acReport, "Report Name Here", "RichTextFormat(*.rtf)",
FormName!EMailaddress, Forms!CCMailAdress, "", "Hey - our machine is broken",
"Please will you come and fix our machine as soon as possible. Thanks",
False, ""
Else
DoCmd.SendObject acReport, "Report Name Here", "RichTextFormat(*.rtf)",
FormName!EMailaddress, , "", "Hey - our machine is broken", "Please will you
come and fix our machine as soon as possible. Thanks", False, ""
End If
End Sub


Note the "" before the "Hey - our..... this is the space where the CC would
be in the "Else" case
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top