Set Error Capture [on] suppresses most error dialogs, but not this one due to a Error Capture.
Here are some alternatives:
Store a name in a text field and use it with Export Field Contents to open each file with a different name.
Assuming each PDF file is stored in the container field of a different record, define an auto-entered serial number field and include this unique ID number in the file name.
Use a global variable to count the number of times Export Field Contents has opened a file in the current session. Include this counter as part of the file name.
That's what I'm trying to do. Each record has it's own ID number. How do I incorporate this field information as part of the file name? I tried: test[document ID].pdf, and the system thought [document ID] was part of the text file name, and not the data contained in the field for that record.
You need to set this up as a text expression that includes the contents of your field.
You should be able to use an expression such as this to set your file path variable:
Set Variable [ $Path ; "file:" & Get ( TemporaryPath ) & YourTable::DocumentID & ".PDF" ]
Export Field Contents [ YourTable::YourContainerField ; "$Path"]
PS. Get ( TemporaryPath ) returns the file path to your temporary items folder--a useful place to which to export such files when you just want to open them.