69. preview

Parameter syntax:

'[lastConverted]' | URL_or_filename

This command is only useful to write interactive macro commands.

Starts a helper application allowing to preview specified URL or file. If an appropriate helper application has not yet been specified using OptionsPreferences, Helper Applications, the user is automatically prompted to specify this application.

The file or directory to be previewed may be specified as:


This specifies the last file or directory selected by the user by the means of the selectConvertedFile command. This command has a "Preview result in helper application" checkbox. This checkbox must have been checked by the user.

Commands preview and selectConvertedFile are used together in the same macro typically as follows:

<command name="docb.convertToPS">
      <command name="selectConvertedFile"
      <command name="docb.toPSFile" parameter='"%0" "%1" "%_"'/>
      <command name="preview" parameter="[lastConverted]"/>

Specifies the file or directory to be previewed by its URL or its filename. A relative URL is relative to the URL of the document being edited. A relative filename is relative to the current working directory.


preview [lastConverted]
preview C:\tmp\test.docx
preview file:///C:/tmp/test.docx
preview images/logo.svg

See also selectConvertedFile.