in reply to Win32::OLE::Variant variables

I still haven't found exactly what I was looking for in any kind of documentation, but I was able to adapt some code from http://aspn.activestate.com/ASPN/Perl/Products/ActivePerl/faq/Windows/ActivePerl-Winfaq12.html

I modified the code there to just view the names of the constants provided by GetDocumentProperties. The code I used was:

use strict; use Win32::OLE; use Win32::OLE::Const; my $filename="word.doc"; #my $properties = Win32::OLE::Const->Load("Microsoft Excel"); # use th +is to see Excel doc properties my $PropertyReader = Win32::OLE->new('DSOleFile.PropertyReader'); my $properties = $PropertyReader->GetDocumentProperties($filename); printf "Library contains %d constants:\n", scalar keys %$properties; foreach my $Key (sort keys %$properties) { print "$Key = $properties->{$Key}\n"; }
You may use any word, excel or powerpoint document in place of word.doc

This returns a list of the properties (38 of them) I was looking for.

Tha parameter to include is just the property from the list below (in all lowercase).

The properties:
AppName, Author, ByteCount, CLSID, Category, CharacterCount, CharacterCountWithSpaces, Comments, Company, CustomProperties, DateCreated, DateLastPrinted, DateLastSaved, HasMacros, HiddenSlides, Icon, IsReadOnly, Keywords, LastEditedBy, LineCount, Location, Manager, MultimediaClips, Name, PageCount, ParagraphCount, PresentationFormat, PresentationNotes, ProgID, RevisionNumber, SlideCount, Subject, Template, Thumbnail, Title, TotalEditTime, Version, WordCount

I have probably revealed an enormous depth of Perl-naivete in what I posted, but it did answer my most immediate need.

I wasted many hours trying to find this information on the web and couldn't find this particular info anywhere. Hope it will help someone else with a similar need.

I would still love for any gurus to point me to a better way to do this, or the unfound documentation that I was looking for. I would also be curious to know if I have missed any similar available file properties.

Replies are listed 'Best First'.
Re^2: Win32::OLE::Variant variables
by Grygonos (Chaplain) on Dec 07, 2004 at 13:32 UTC
    Use the OLE Object Browser installed with ActiveState or for other things open up your "OLE-using" program of choice for example Excel. And open up its internal object browser .. which has pretty decent documentation.