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("Please click here now"); my $range = $document->content; my $search = $range->Find; $search->{Text} = "here"; my $link = $search->Execute(); print $link ? "yes\n":"no\n"; #just so you can see $document->Hyperlinks->Add({ Anchor => $range, Address => "http://www.perlmonks.org" });