AttachmentLaunch @Command (Formula Language)

Launches the selected attachment by opening the application in which it was created, if possible.

Syntax

@Command( [AttachmentLaunch] )

Usage

  • A document must be open in Read or Edit mode.
  • A form or subform must be open in Design mode.
  • An attachment must be selected.

This @command does not work in Web applications. If a rich-text field on a form contains an attachment on the Web and you click the attachment's icon, Notes® either launches the attachment (TXT files, for example) or prompts the user to detach the file by saving it to disk (NSF files, for example).

This @command does not work when used in a hotspot button. The hotspot button takes focus away from the attachment that must be selected to be launched. Use in an action button instead.

If the user's machine does not have the program that runs the attachment being launched, the following error is generated, "Sorry, an application to open this document cannot be found."

Examples

This formula, when added to a "Launch" action button on a form, launches the Notepad file, LICENSE.TXT, which is attached to a rich-text field on the form. First, you click the LICENSE.TXT icon to select it, then you click the "Launch" button. The program NOTEPAD.EXE launches, displaying the LICENSE.TXT file.
@Command([AttachmentLaunch])