[ exportDataObject ] this.exportDataObject({cName:"MyDoc", nLaunch:2}); The "cName" parameter is a required input and specifies the specific file attachment that will be exported. Notice there is no path parameter. There is in fact a "cPath" input to this function, but it is no longer valid. If you try to use a path in this function, it will fail and throw an exception. It doesn't matter what context the function is called from because the "cPath" parameter was removed from all usage. An nLaunch value of "2" directs Acrobat to save the file attachment to a temporary file and then ask the operating system to open it (Acrobat doesn't know anything about which programs open which file types, but the OS does). Other possible values are 0 and 1. A value of "0" causes the file to be saved, and a value of "1" causes the file to be opened after it is saved. Both of these options will cause the File Open Dialog to be displayed. All the variations for the code shown above will work from any context. This code will work in an automation or a PDF script, and it will work when a PDF is opened in Reader, i.e., there are no security restrictions. However, the first time this code is run, a popup will be displayed asking users if they are sure they want to allow the attachment to be exported. There's no getting around this popup, but at least it only happens once. ref: https://acrobatusers.com/tutorials/print/importing-and-exporting-pdf-file-attachments-acrobat-javascript/