Office group

These variables access metadata fields embedded in Microsoft Office documents (Excel files, Word documents, PowerPoint presentations).

Note: If a Microsoft Office document is password protected, Switch has no access to the metadata, hence these variables cannot be used.

Variable name

Data type

Description

Office.Application Text

Name of the application that created the document, for example: Microsoft Office Word

Office.AppVersion Text

Version of the application that created the document; string of the form XX.YYYY (X and Y representing numerical values), for example: 14.0000

Office.Author Text Author of the document
Office.Category Text Category of the document
Office.Company Text

Name of a company associated with the document

Office.ContentStatus Text Status of the document content, for example: Draft, Reviewed, Final, ...
Office.ContentType Text Type of document content, for example: Whitepaper, Security Bulletin, Exam, ...
Office.Created Date Date and time when the document was created, for example: 2014-02-05T10:10:36.000Z. You can modify the format, for example: dd:MM:yy mm:ss (UTC time zone) will result in 05:02:14 10:36
Office.Custom Text

The metadata value selected from the document using XPath expression provided in the 'Path' argument. The argument 'Set' defines the metadata set where the required value is searched for. The possible values for the 'Set' argument are 'Core' and 'Extended' (used as the default value). For more details, refer to the section below.

Office.Description Text Textual description of the document
Office.DocSecurity Integer
Security level of the document:
  • 0 = None
  • 1 = Document is password protected
  • 2 = Document is recommended to be opened as read-only
  • 4 = Document must be opened as read-only
  • 8 = Document is locked for annotation
Office.HyperlinkBase Text

Base string used for evaluating relative hyperlinks in this document

Office.HyperlinksChanged Boolean
Indicates whether or not hyperlinks were changed:
  • True = One or more hyperlinks in this part were updated exclusively in this part by a producer
  • False = No hyperlinks were updated
Office.Identifier Text Identifier of the document
Office.Keywords Text Keywords that specify the topic of the document
Office.Language Text Language of the document
Office.LinksUpToDate Boolean
State of the hyperlinks in the document:
  • True = Hyperlinks are up-to-date
  • False = Hyperlinks are outdated
Office.Manager Text Name of a supervisor associated with the document
Office.Modified Date Date and time when the document was last modified
Office.ModifiedBy Text Author of the last modification in the document
Office.NumberOfCharacters Integer

Total number of characters in the document

Office.NumberOfCharacters

WithSpaces

Integer

Last count of the number of characters (including spaces) in this document

Office.NumberOfHiddenSlides Integer

Number of hidden slides in the presentation

Office.NumberOfLines Integer

Total number of lines in the document when last saved by a conforming producer

Office.NumberOfMMClips Integer

Total number of sound or video clips that are present in the document

Office.NumberOfNotes Integer

Number of slides in the presentation containing notes

Office.NumberOfPages Integer

Total number of pages in the document

Office.NumberOfParagraphs Integer

Total number of paragraphs found in the document

Office.NumberOfSlides Integer

Total number of slides in the presentation

Office.NumberOfWords Integer

Total number of words in the document when the document was last saved

Office.PresentationFormat Text

Intended format for the presentation, for example a presentation intended to be shown on video has PresentationFormat Video, a presentation to be shown on screen, could have On-screen (4:3), ...

Office.Printed Date Date and time when the document was last printed
Office.Revision Integer Revision number
Office.ScaleCrop Boolean
Display mode of the document thumbnail:
  • True = Thumbnail is scaled to fit the display
  • False = Thumbnail is cropped to show only sections that fit the display
Office.SharedDoc Boolean
Indicates whether or not the document is shared:
  • True = Document is currently shared between multiple producers
  • False = Document is not shared
Office.Subject Text Subject of the document
Office.Template Text Name of an external document template containing format and style information used to create the document.

Office.Title

Text

Title of the document

Office.TotalTime Integer Total time that the document has been edited. The default time unit is minutes.
Office.Version Integer Version number

Office.Custom

Use this variable if there is a metadata tag in your Office document that does not have a dedicated Switch variable. The [Office.Custom] variable allows you to retreive the value of this tag, on condition that you have the correct XPath expression. Note that the data type of this variable is 'Text', so only text manipulation arguments are available for it.

The metadata value is selected from the document using the XPath expression provided in the Path argument. All prefixes used in the expression must occur in the default namespace map for the metadata XML file. There is no way to specify explicit mappings. The default namespace is automatically available using prefix 'dn'.

The argument Set defines the metadata set where the required value is searched for. The possible values are 'Core' and 'Extended' (used as the default value):
  • The 'Core' set corresponds to the document properties (normally located in the file docProps/core.xml). Normally, the XPath for this set will begin with '/cp:coreProperties'.
  • The 'Extended' set contains extended properties (normally located in the file docProps/app.xml). The XPath begins with '/dn:Properties' where 'dn' is the prefix for the default namespace, automatically provided by Switch.

Examples

[Office.Custom:Path="/dn:Properties/dn:Application"] - This gives the same result as [Office.Application]
[Office.Custom:Path="/dn:Properties/dn:TitlesOfParts/vt:vector/vt:lpstr[1]",Set="Extended"] - The title of some document part
[Office.Custom:Path="/cp:coreProperties/dc:title",Set="Core"] - This gives the same result as [Office.Title]

More information about the Office Open XML format and its metadata can be found here: http://en.wikipedia.org/wiki/Office_Open_XML_file_formats.