S
Sylvia
Hello all,
I'm trying to use my first module (and use perl for the first time in a
number of years, too).
I was able to install the Win32::OLE module, but now I'm not sure how
I'd go about doing 2 things:
1. Opening a word doc file on the web
2. Copying all the text from the word doc file into a variable.
This is what I have right now - it doesn't return errors, but it also
doesn't work. I've tried with both local files and word files on the
internet (which is what I need in the end) but neither works.
**************************************************
use strict;
use Win32::OLE ("with");
use Win32::OLE::Variant;
use Win32::OLE::Const 'Microsoft Word';
my $App = Win32::OLE->new('Word.Application') or
die "Cannot create Word.Application";
#my $files = ("c:\junk\test.doc");
# my @files = ("c:\junk\test.doc");
my @files =
("http://www.cityofbellevue.org/departments/Police/files/Press_2005_08_01_2000.doc");
foreach my $file (@files)
{
my $DocText = $App->Selection;
print $DocText;
}
$App->Quit();
**************************************************
Any thoughts as the direction I should be headed in?
thanks much for any advice!
Sylvia
I'm trying to use my first module (and use perl for the first time in a
number of years, too).
I was able to install the Win32::OLE module, but now I'm not sure how
I'd go about doing 2 things:
1. Opening a word doc file on the web
2. Copying all the text from the word doc file into a variable.
This is what I have right now - it doesn't return errors, but it also
doesn't work. I've tried with both local files and word files on the
internet (which is what I need in the end) but neither works.
**************************************************
use strict;
use Win32::OLE ("with");
use Win32::OLE::Variant;
use Win32::OLE::Const 'Microsoft Word';
my $App = Win32::OLE->new('Word.Application') or
die "Cannot create Word.Application";
#my $files = ("c:\junk\test.doc");
# my @files = ("c:\junk\test.doc");
my @files =
("http://www.cityofbellevue.org/departments/Police/files/Press_2005_08_01_2000.doc");
foreach my $file (@files)
{
my $DocText = $App->Selection;
print $DocText;
}
$App->Quit();
**************************************************
Any thoughts as the direction I should be headed in?
thanks much for any advice!
Sylvia