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.