addProperties

addProperties

BASIC / ADVANCED / PREMIUM

Modifies the document properties.

Description
public addProperties ( array $properties )

This method modifies the properties of the Word document.

With this method it is possible to modify/add the document:

  • title,
  • subject,
  • author (creator),
  • keywords,
  • description,
  • category,
  • contentStatus (final, draft, ...),
  • Manager,
  • Company and
  • custom properties (name, type and value).

To modify the layout properties you should use modifyPageLayout method instead.

Parameters

properties

The possible keys and values of this array are:

key Type Description
title string The title of the document.
subject string The subject of the document.
creator string The document author or creator.
keywords string A list of keywords that may be separated by any character you wish.
description string The description of the document.
category string The category to which we want to associate the document.
manager string The name of the associated Manager.
company string The company name.
contentStatus string The current status of the document: final, draft, ...
custom array An array of custom properties. Each entry is composed by the name of the property as key and a value that is itself an array with the type and actual value of the variable.
Return values

Void.

Code samples

Example #1

The resulting Word document looks like: