Forum Discussion
TanyaYatskovska
11 years agoSmartBear Alumni (Retired)
Hi Jenifer,
I've answered you in the TestComplete LinkedIn group. Here is the copy of my reply:
You can use the Hyperlinks.Add Method method - http://msdn.microsoft.com/en-us/library/office/ff822490.aspx
I have a sample that adds a hyperlink to a Word document - maybe it will help:
'VBScript
Sub Main
Dim strLink, oWord, oDoc, oRange, oHL
strLink = "http://www.smartbear.com"
Set oWord = Sys.OleObject("Word.Application")
oWord.Visible = True
Set oDoc = oWord.Documents.Add
Set oRange = oDoc.Range
Set oHL = oRange.Hyperlinks.Add(oRange, strLink, False, False, "Sample")
End Sub
Related Content
- 2 months ago
- 7 years ago
- 3 years ago
- 8 years ago
- 3 years ago
Recent Discussions
- 11 hours ago