Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Sunil Garg   on Aug 19 In MS Office Category.

  
Question Answered By: Zachary Bouchard   on Aug 19

Couldn't get SendKeys to work so I opted for the following Sub

Sub eMailActivation()
CurrentRow = 4 'after the header
EndOfFile = Cells(Rows.Count, "A").End(xlUp).Row 'get EndOfFile

While CurrentRow < EndOfFile + 1
Cells(CurrentRow, 6).Select 'Column F
eMailAddress = ActiveCell.Value
If eMailAddress <> Empty Then
ActiveSheet.Hyperlinks.Add _
Anchor:=Selection, _
Address:="mailto:" & eMailAddress, _
TextToDisplay:=eMailAddress
End If
CurrentRow = CurrentRow + 1
Wend
End Sub

Share: 

 
 
Didn't find what you were looking for? Find more on Activating the hyperlink for an eMail with VBA Or get search suggestion and latest updates.


Tagged: