Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Starting Outlook via FollowHyperlink event
I have an e-mail address in a sheet, and a text in the column to the right
of the address. I use the FollowHyperlink event to trig the following code. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Dim olApp As New Outlook.Application Dim olNewMail As Object Dim Recep As String Dim MsgTxt As String Set olApp = GetObject("Outlook.Application") Recep = Target.Value MsgTxt = Target.Offset(0, 1).Value Set olNewMail = CreateItem(olMailItem) With olNewMail .Recipients.Add Recep .Body = MsgTxt .Subject = "Automatisk mail" .ReadReceiptRequested = False .OriginatorDeliveryReportRequested = False .Save .Display End With End Sub This opens an Outlook mailitem, with the recipeint from one column and the text from the other ad it suposed to. The problem is, that the clicking the hyperlink also performs its normal operation, that is opening a mailitem, with only the recipient. Is there a way to cancel the orginal event and only use my code? Of course I can use another event, but unfortunately the users wants click on the mail address as they are used to. Jan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel to add event on outlook calender | Excel Discussion (Misc queries) | |||
Stop Outlook from starting when typing email addresses into a cell | Excel Discussion (Misc queries) | |||
Starting/Stopping Worksheet Event Code | Excel Discussion (Misc queries) | |||
Outlook Event Entry | Excel Programming | |||
followhyperlink event for textboxs | Excel Programming |