EditDetach @Command (Formula Language)

Detaches a file attachment to a location you specify.


@Command( [EditDetach] )


@Command( [EditDetach] ; sourcefile ; targetfile )



Text. The name of the attachment you want to detach.


Text. A path and file name indicating where you want to put the file. Include the complete path specification (appropriate to the user's operating system).


With no parameters, displays the Save Attachment dialog box for the current attachment.A document must be open in Read or Edit mode and the attachment must be selected.

This command is useful in action buttons; it cannot be added to a hotspot button. It does not work on the Web.

With both parameters, detaches the specified sourcefile and stores it using the targetfile path and file name without displaying the Save Attachment dialog box. A document must be open in Read or Edit mode, but since you are specifying which attachment to detach, the attachment does not have to be selected.

If using this command in a hotspot button or any other element that causes a change in focus, the EditGoToField or EditTop command must be used first to return the focus to the document. The document must be in Edit mode.


  1. This formula displays the Save Attachment dialog box.
  2. This formula detaches the 1-2-3® for Macintosh worksheet "Budget96" from the open document and stores it in the folder called "Worksheets" on "Macintosh HD," the user's Macintosh workstation.
    @Command([EditDetach];"BUDGET96";"Macintosh HD:Worksheets:Budget96")