# print out constants loaded for Microsoft Office use strict; use warnings; use Win32::OLE::Const "Microsoft Office .* Object Library"; my $names = Win32::OLE::Const->Load("Microsoft Office .* Object Library"); printf "Office type library contains %d constants:\n", scalar keys %$names; foreach my $Key (sort keys %$names) { print "$Key = $names->{$Key}\n"; } #### C:\winbat>perl -w msoconstants.pl Office type library contains 221 constants: KeepLocal = 0 LogMessages = 0 Replicable = 0 ReplicableBool = 0 V1xNullBehavior = 0 dbAppendOnly = 8 dbAttachExclusive = 65536 dbAttachSavePWD = 131072 dbAttachedODBC = 536870912 dbAttachedTable = 1073741824 dbAttachment = 101