Hello again.
I've a small problem again...
I'm now testing my macros in office 2007 and there's a strange problem
With .TextFrame.TextRange.Characters(id_begin, id_length) 'selecting the part where IdString is
With .ActionSettings(ppMouseClick).Hyperlink 'Adding the hyperlink
.Address = HyperlinksTable(i)
.SubAddress = ""
.ScreenTip = ""
.TextToDisplay = IdTable(i)
End With
End With
That code works perfectly in office2k3, but in 2k7, the hyperlink appears in the beginning of the text.
I'll explain the variables a bit
'Hyperlinkstable' contains the hyperlink to be added
'idtable', contains the text to be shown with the hyperlink
id_begin contains the starting index number where to add the hyperlink (it comes from total_length -id_length [ where total length is textbody and id_length is the length of the name of the hyperlink])
example:
textbody = "aaaabbbbcccc", length 12
id_string = "00001111", length 8
total_length = 20
id_begin = 12
id_length = 8
in 2003 version, my code puts the link in the 00001111
but in 2007 it goes in aaaabbbb
Hope you understand.
Thanks.
Solved by myself
Just had to remove row ".TextToDisplay = IdTable(i)"
Bookmarks