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:

[lastConverted]

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">
  <macro>
    <sequence>
      <command name="selectConvertedFile"
               parameter="saveFileURLWithExtension=%0"/>
      <command name="docb.toPSFile" parameter='"%0" "%1" "%_"'/>
      <command name="preview" parameter="[lastConverted]"/>
    </sequence>
  </macro>
</command>
URL_or_filename

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.

Examples:

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

See also selectConvertedFile.