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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.