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 / Modules / DAO / VBA / September 2006

Tip: Looking for answers? Try searching our database.

Opening an access email by double clicking on a text area

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Contro - 26 Sep 2006 09:05 GMT
Hi guys!

I have a problem: basically, I have a text area on a form that allows
an email address to be entered.  When the user double clicks on this, I
want an Outlook email box to appear, with that email address in the
"to" box at the top.

I have some code which I found that does work, most of the time, but on
some computers, it opens Outlook Express, which is not desired.  I want
it to always open Outlook, no matter what a user's pc is configured
like.

I found this code online:

http://groups.google.com/group/microsoft.public.access.modulesdaovba/browse_thre
ad/thread/3e79922b87c6e4e8/0b2898ac4d3bdcba?lnk=st&q=microsoft+access+open+outlo
ok&rnum=18&hl=en#0b2898ac4d3bdcba


But couldn't get this to work for me.  Something about a "user defined
type not defined" when I try to use this code.  I'm not the best on vb,
so it might be something simple that makes it not work...is this code
easily convertable to my needs?

This is the code I'm using at the moment, which sometimes opens Outlook
Express:

Dim strEmail As String

   If Not IsNull(Me.Email) Then
       strEmail = Me.Email
       If Left(strEmail, 7) <> "mailto:" Then
           strEmail = "mailto: " & strEmail
       End If
       Application.FollowHyperlink strEmail
   End If

Is it easy to modify this code for my needs as well?  If so, how would
I do this?  Any help would be hugely appreciated!

Thank you very much in advance!

Contro.
Alex Dybenko - 27 Sep 2006 08:40 GMT
Hi,
in order to use the code you mentioned - you have to add a reference to
outlook object library - menu tools-references

But personally - I would leave default email program opening

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

> Hi guys!
>
[quoted text clipped - 36 lines]
>
> Contro.
Contro - 28 Sep 2006 13:51 GMT
Great, thank you!  I'll give that a go.

And yes, I might revert to keeping with the default

> Hi,
> in order to use the code you mentioned - you have to add a reference to
[quoted text clipped - 49 lines]
> >
> > Contro.
 
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.