50pt
URL は参考程度に。
1. DSOFILE.EXE( プロパティ取得用 COM オブジェクト)を入手します。
[MS] Dsofile.exe Lets You Edit Office Document Properties from Visual Basic and ASP
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q224351
The Dsofile.dll files lets you edit Office document properties when you do not have Office installed
2. Perl から Win32::OLE を利用して COM 呼び出しを行います。
「DSOleFile」オブジェクトを利用することで、プロパティが取得できます。
Perl / Simple prob changing office doc property
http://www.code4u.com/?page=forum&action=view§ionID=17&topic...
Code4u.com - your code for sourcecode
use Win32::OLE;
use File::Spec;
my $PropertyReader = Win32::OLE->new(’DSOleFile.PropertyReader’, ’Quit’);
my $directory = ”c:¥¥temp”;
opendir(DNAME, $directory) || die ”Unable to open the requested directory: $directory¥n”;
while( my $filename = readdir( DNAME ) )
{
next if ($filename eq ’.’ or $filename eq ’..’);
my $fullfilename = File::Spec->catdir($directory,$filename);
my $properties = $PropertyReader->GetDocumentProperties($fullfilename) || die(”Unable read file properties for ’$fullfilename’ ”, Win32::OLE->LastError());
print ”File ’$filename’ --- Title property is ’” . $properties->{title} .”’¥n”;
}
closedir(DNAME);
すばらしいです。半日ネット上を探し回った挙句解決方法が見つからなかったのに、この回答でずばりでした。