Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use field data as email adress and start Outlook 2

Status
Not open for further replies.
Aug 10, 2001
15
0
0
AT
Maybe my English will not be correct, since I am using the German version of Access: Here comes the problem:

When I enter an email adress in my text field (defined as hyperlink), clicking on the entry makes the browser start, not outlook. I would have to open the hyperlink property box and set: 'mailto' instead of http:\\. How can I automize this procedure?


 
Hello.

I have a simular situation. Here is what I do.

1. List my email addresses in a table as text.
2. I have a combobox on my form with the email addresses.
3. I select the one I want.
4. On my DoubleClick event I have the following code...

DoCmd.SendObject , , , ComboBoxName, , , , , -1

Using the SendObject, I can make use of it's positional parameters. The 4th position is the Mail To field and I insert the value of what's in the combobox. The 9th position indicates if I want to open Email to edit the message (-1 = True, 0 = False).

Note: I decided to use the Double Click event for no particular reason at all. You could use the combobox's AfterUpdate or create a command button. The choice is yours.

Hope this helps.

B-) ljprodev@yahoo.com
ProDev, MS Access Applications
 
Thank you, Lonnie,
I have used it for the simple text field. I set the hyperlink on 'no' and used the code also for double-click, with a good reason: simple clicking allows to change the content of the field without using right botton stories.

Thank you again.

Maybe you can help me on a similar problem: I want to use a field as hyperlink to a word document. The content of the hyperlink field is defined as "C:\...\...\"&[MyField]&".rft" with a SetValue Clause in a macro.
The problem is, when clicking on the hyperlink field, it does nothing, because SetValue wrote the definition in the text, not in the hyperlink.

Any ideas on a solution? Hope to reading you soon
Bye, Yvonne
 
Not sure exactly what you are trying to do. But I think I have a simular situation to yours. I have a label that I use to open word docs.

In the label's click event I have this...

Private Sub MyLable_Click()
Dim strFile As String
strFile = InputBox("What is file name and extension?")
MyLable.HyperlinkAddress = "c:\" & strFile
End Sub

This will prompt the user for the file name. When they type it into the InputBox, I set the label's Hyperlink address to this file and it opens.

Maybe this will get you close to what you are trying.

B-)
ljprodev@yahoo.com
ProDev, MS Access Applications
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top