Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Email Hyperlink from Access to Outlook

Posted on 2013-01-11
4
Medium Priority
?
413 Views
Last Modified: 2013-01-11
In Access 2010 I have a form with a command button which creates an Outlook email.  When you click the button it opens up the email in Outlook and in the body I need a link back to the database.

I cannot get the link to work.  Here is the code I've tried to use.

StrBody = StrBody & "<A href='file://S:/Users/jal.doc'><U>Click Here</U></A>"

Also, just out of curiosity, is there a way to send an email from Access to Outlook which has a link to a specific form?

Can anyone help me with this?

Thanks in advance!
0
Comment
Question by:Senniger1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 38766901
You'll have to take a different approach... SendObject as in your previous questions doesn't give you that type of flexibility.

Try this:

Dim olObj As Object
Dim olMail As Object

strbody = strbody & "<A href='file://S:/Users/jal.doc'><U>Click Here</U></A>"

Set olObj = CreateObject("outlook.application")

Set olMail = olObj.CreateItem(0)
With olMail
    .to = "abc@xyz.com"
    .cc = "123@nnn.com"
    .subject = "Blah"
    .HTMLBody = strbody
    .Display
End With
Set olMail = Nothing
Set olObj = Nothing

Open in new window

0
 
LVL 61

Expert Comment

by:mbizup
ID: 38766935
Also,  for the above code to work you need to make sure that your Outlook options allow HTML emails.   (It wouldn't work at my location, because all of our emails are plain text)
0
 
LVL 61

Expert Comment

by:mbizup
ID: 38766959
<<
Also, just out of curiosity, is there a way to send an email from Access to Outlook which has a link to a specific form?
>>

No... but you can send a link to a database which has an autoExec Macro or startup form which takes the user to that specific form. The link will open the database, and the startup macro or code will take the user to the form (I can't think of anyway to get the user to a specific record on that form, though).
0
 

Author Closing Comment

by:Senniger1
ID: 38767041
Perfect.  Thank you!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question