With BaseExtensions we are able to load different Blank.potx presentations based on the value in a Document Property.
This command is intended to be run on a start up event.
It is also intended to be utilised alongside a Templafy setup, as this allows for a document property to be set based on selections in User Profile (see example further below).
<Cmd case="BaseExtensions:blank-check-docprop" name="xx"/>
The command will check the value of custom document property with a title matching the value defined in parameter
It will then print this value to this file (and spawn the file, if it does not already exist):
The value inside will update each time command is run and detects a docprop matching the one defined in the parameter.
If, when command is run, it detects a match between the value in the
config.json and a
.potx file name located here:
It will open this file as a Blank presentation.
Example (3 steps)
Let's say a client needs load different Blanks based on the location of the user's office: one for Middle Eastern offices, one for Japanese offices and one for all other offices.
Step 1 - set docprop
First, we utilise native Templafy functionality to set a custom document property titled
Location with the value of
UserProfile.Office.Blank. The user input in the
Office-dropdown, will convert to one of the following values:
Step 2 - place Blanks
Secondly, we place three different Blanks in the following folder of the SDUP:
The three Blanks will be named
Step 3 - module
We use the following module:
<Cmd case="BaseExtensions:blank-check-docprop" name="Location"/>
<Cmd case="BaseExtensions:remove-doc-prop" name="Location"/>