use strict; use Win32::OLE qw(in); use Win32::OLE::Const 'Microsoft Office'; #my ( $doc ) = Win32::OLE->GetObject('D:/4nt8/perl-msword_dap/excel_dap/Inrichting Arag-ftp.doc'); my ( $doc ) = Win32::OLE->GetObject('//vldfps1/algemeen/FM&O/Klanten/S-t/TESTING/Dap Dossier/01. Dap/FBL.OPR.UX.138 WI Inloggen, shutdown en reboot van LPAR AIX systemen m.b.v. de HMC en PTY.doc'); my $property = 'Arno'; my $value = 'KranenDONK'; my $docprops = $doc->CustomDocumentProperties(); unless (defined ($doc->CustomDocumentProperties($property))) { $docprops->Invoke('Add', { Name => $property, LinkToContent => 0, Type => 4, #msoPropertyTypeString #strictures to work around still Value => $value, }); } $doc->CustomDocumentProperties($property)->{Value} = $value; $doc->{Saved} = 0; # SEE : http://support.microsoft.com/kb/195425 en http://compgroups.net/comp.lang.perl.misc/how-read-ms-word-summary-properties/477092 $doc->Save; $doc-> Close;