I am trying to access user defined variables, and cannot!
These are defined in openoffice via the menus...
Insert-Fields-Other
then selecting the "Variables" tab, and the Type "User Field".
My perl to access it is...
#!/usr/bin/perl
use OpenOffice::OODoc;
my $docpath = shift;
my $archive = ooFile($docpath);
my $doc = ooDocument(archive => $archive); ## For user defined variable fields
my $meta = ooMeta(archive => $archive); ## For document properties
my $f;
foreach $fname qw(MyTestfield ReleaseDate MyOtherField) {
if ($f = $doc->userFieldValue($fname)) {
## Got it
print "Got it: $f\n";
}
else {
print "FAILED $fname\n";
}
}
Yet when I run this I get
FAILED MyTestfield
FAILED ReleaseDate
FAILED MyOtherField
I have also tried the function "variableValue()", but it also returns nothing.
I have placed my test document here
Thanks in advance!
Jon B