gwhite has asked for the wisdom of the Perl Monks concerning the following question:
in the MS doc I found that I should be able to useUnable to open property Win32::OLE(0.1501) error 0x80020011: "Does not + support a collection" in METHOD/PROPERTYGET "" at pdf_testing.pl line 31.
use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; my $wd = Win32::OLE::Const->Load("Microsoft Word 10.0 Object Library") +; my ($pages,$doc); my $Word = Win32::OLE->new('Word.Application', 'Quit'); # $Word->{'Visible'} = 1; # if you want to see what's going on my $doc = $Word->Documents->Open("P:\\My DOCUMENTS\\test.doc") || die("Unable to open document ", Win32::OLE->LastError()); $pages = $doc->Information($$wd{'wdNumberOfPagesInDocument'}) || die(" +Unable to open property ", Win32::OLE->LastError()); print "The number of pages in test.doc are: $pages"; exit;
g_White
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::OLE + word page count
by Rudif (Hermit) on Aug 15, 2001 at 01:51 UTC | |
by softworkz (Monk) on Aug 15, 2001 at 20:54 UTC | |
|
Re: Win32::OLE + word page count
by John M. Dlugosz (Monsignor) on Aug 15, 2001 at 01:56 UTC | |
|
Re: Win32::OLE + word page count
by rchiav (Deacon) on Aug 15, 2001 at 21:01 UTC |