thoglette has asked for the wisdom of the Perl Monks concerning the following question:
However, this warns Can't use an undefined value as a HASH reference at C:\Public\Projects\gold\update_msword.pl if the custom property does not already exist. The appropriate VBA code is...$property = "FooBar"; $doc->CustomDocumentProperties($property)->{Value} = $text_value;
'If customdocument property did not exist, create it If Err.Number <> 0 Then Set DocProps = ThisWorkbook.CustomDocumentProperties DocProps.Add Name:="FooBar", _ LinkToContent:=False, _ Type:=msoPropertyTypeString, _ Value:=str_content End If
Which leads the following questions under Win32::OLE
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Adding MSWord custom properties in Win32::OLE
by jdtoronto (Prior) on Aug 30, 2006 at 08:28 UTC | |
by thoglette (Scribe) on Sep 06, 2006 at 05:06 UTC | |
Re: Adding MSWord custom properties in Win32::OLE
by teun-arno (Acolyte) on Mar 05, 2014 at 14:27 UTC |