Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] Read MS-Word document through perl

Expand Messages
  • Donato Azevedo
    try using win32 OLE, for instance: use strict; use Win32::OLE; use Win32::OLE::Const Microsoft Word ; my $Word = Win32::OLE- new( Word.Application ,
    Message 1 of 2 , Apr 28, 2005
      try using win32 OLE, for instance:
      use strict;
      use Win32::OLE;
      use Win32::OLE::Const 'Microsoft Word';
      <code>
      my $Word = Win32::OLE->new('Word.Application', 'Quit');
      # $Word->{'Visible'} = 1; # if you want to see what's going on
      $Word->Documents->Open("C:\\DOCUMENTS\\test.doc")
      || die("Unable to open document ", Win32::OLE->LastError());
      </code>

      With this you get a $word object with access to some methods for which
      you can get the description in MS Word itself (pressing ALT + F11 and
      then F2).
      If you have trouble getting that to work, send me a sample word
      document and I'll manage to find some time to write a simple script,
      okay????

      On 4/28/05, YogS <mail2yogs@...> wrote:
      > Hello,
      >
      > Is it possible to read "Tables" from any ms word document using perl,
      > I know there are modules which enables to read XLS, but about MS-Word,
      > no clue, I tried on CPAN also.
      >
      > Pls give me some directions
      >
      > Regards
      > YogS
      >
      > Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html
      > Yahoo! Groups Links
      >
      >
      >
      >
      >


      --
      *******************************************
      Donato Azevedo
      Engenharia de Controle e Automação
      UFMG
      *******************************************
      We will encourage you to develop the three great virtues
      of a programmer: laziness, impatience, and hubris.
      "Larry Wall - Programming perl"
    Your message has been successfully submitted and would be delivered to recipients shortly.