in reply to Hyperlink Question

This is more of a VBA question than a Perl question, since Win32::OLE basically gives you direct access to that API. The problem seems to stem from how Word internally implements hyperlinks, and retreiving the contents of the document is not as straightforward as character indexes when there are hyperlinks present. For example, if you add print "<",$d->Range(62,111)->{Text},">\n"; to your code after adding the hyperlink, you'll see the output <HYPERLINK "http://www.perlmonks.org" hyperlink>. Perhaps something like this SO answer could be helpful to you in implementing this correctly. Once you have the code figured out in the VBA world, it should be trivial to translate it to Perl.

Replies are listed 'Best First'.
Re^2: Hyperlink Question
by Anonymous Monk on Sep 29, 2020 at 23:36 UTC

    Thank you very much for your help