Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Hyperlink Question

by haukex (Archbishop)
on Sep 27, 2020 at 17:47 UTC ( [id://11122268]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11122268]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-25 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found