office document properties

Prev Next

Function Names

office document properties

Library

Office Library

Description

This function reveals the document properties of Microsoft office files with the extensions
.docx, .xlsx/.xlsm, .pptx, .vsdx, etc. The properties may include info about persons who have created or modified the files, etc.

Attention: Encrypted, binary and proprietary legacy file types (e.g. .xlsb, .xls, .doc, .ppt) cannot be processed.

Call as: procedure

Restrictions

Under normal conditions, the 'Office Library' is loaded automatically, so no 'include(...)' call is needed.

Parameter count

3

Parameters

No.TypeDescription
1.
input
string Path and file name

It must be a file name of a valid Microsoft open office file.

2.
output
set Property names

All identified property names will be stored in this variable.

3.
output
set Property values

All corresponding property values will be stored in this variable. The number of elements in both 2nd and 3rd function parameters will be equal.

Exceptions

File is not an office file.

Examples

       office document properties( "Examples\Football Membership List.xlsx", property names[], property values[] );

       for all parameters( property names[], pn[], index[] )
       {
           echo( str( pn[], "16#", align right), "  :  ", property values[]{index[]} );
       }

Output

         creator  :  Zur Bonsen Georg
  lastmodifiedby  :  Zur Bonsen Georg
         created  :  2020-07-08 19:27:50
        modified  :  2021-01-03 21:17:40
Try it yourself: Open LIB_Function_office_document_properties.b4p in B4P_Examples.zip. Decompress before use.