J
Jenny Fletcher
I have two questions regarding the Word 9 Object library.
1. In my word document I have a contents section where the
entries are linked to the corresponding sections in the
document. In my code I am trying to determine the Range
that the hyperlinks are linked to.
e.g.
Dim objHyperlink As Word.Hyperlink
Dim objWdRange as Word.Range
Dim strName as Name
'check for hyperlinks
If objWdRange.Hyperlinks.Count > 0 Then
For Each objHyperlink In WdRange.Hyperlinks
'check that the hyperlink is within range
If objHyperlink.Range.Start >= objWdRange.Start And
objHyperlink.Range.End < objWdRange.End Then
strName = objHyperlink.Name
'which range does this hyperlink link to ????
End If
Next
End If
2. Also, how do I make translate the Word colour constants
into something that I can make any sense of in VB.NET?
Thanks for any help,
Jenny
1. In my word document I have a contents section where the
entries are linked to the corresponding sections in the
document. In my code I am trying to determine the Range
that the hyperlinks are linked to.
e.g.
Dim objHyperlink As Word.Hyperlink
Dim objWdRange as Word.Range
Dim strName as Name
'check for hyperlinks
If objWdRange.Hyperlinks.Count > 0 Then
For Each objHyperlink In WdRange.Hyperlinks
'check that the hyperlink is within range
If objHyperlink.Range.Start >= objWdRange.Start And
objHyperlink.Range.End < objWdRange.End Then
strName = objHyperlink.Name
'which range does this hyperlink link to ????
End If
Next
End If
2. Also, how do I make translate the Word colour constants
into something that I can make any sense of in VB.NET?
Thanks for any help,
Jenny