in reply to Adding Hyperlink to a MS Word Document using Win32:OLE
#!/usr/bin/perl use strict; use warnings; use Win32::OLE; my $word = Win32::OLE->new('Word.Application') or die $!; $word->{'Visible'} = 1; my $document = $word->Documents->Add; my $selection = $word->Selection; $selection->TypeText("Click here"); my $range = $word->ActiveDocument->Content; $document->Hyperlinks->Add({ Anchor => $range, Address => "http://www.perlmonks.org" });
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding Hyperlink to a MS Word Document using Win32:OLE
by roshmont (Initiate) on Feb 03, 2006 at 17:36 UTC |