2014-01-07 42 views
0

我想用perl搜索MS word doc中的超鏈接。有什麼方法可以找出MS Word文檔中的超鏈接嗎?如何使用perl檢查ms單詞中的超鏈接?

+0

http://search.cpan.org/~snkwatt/Text-Extract-Word-0.04/lib/Text/Extract/Word.pm的http://搜索.cpan.org /〜amiri/MSWord-ToHTML-0.010/lib/MSWord/ToHTML.pm http://search.cpan.org/~bdfoy/HTML-SimpleLinkExtor-1.26/lib/HTML/SimpleLinkExtor.pm http:///search.cpan.org/~gaas/HTML-Parser-3.71/lib/HTML/LinkExtor.pm –

回答

1

我得到了解決,

my $Hyperlinks = $document->Hyperlinks(); 
    my $enumerate1 = new Win32::OLE::Enum($Hyperlinks); 
    my $count1 = $Hyperlinks->{Count}; 
    print " count1 --> $count1 \n"; 

    while(defined($Hyperlinks = $enumerate1->Next())) 
    { 
     my $text = $Hyperlinks->{Range}->{Text}; 
     print "text is $text \n"; 
    } 
相關問題