Yes, pathing is always fun. The error your getting is because FileMaker can't find or write where you've pointed, or the filename itself is invalid (slashes or other non-ASCII characters in the filename).
Can you export using the variable filename to the local desktop? I find it easiest to create a $output variable that can set part of the path with an additional variable for the filename. For example:
"filewin:" & Get ( DesktopPath ) & Document::FileName
Documents::FIleName could be a variable instead of a field value. This test at least confirms that there isn't anything wrong with the filename that's being used for Windows (or Mac for that matter). If you can save it locally, then you've resolved that as a possible issue. This format also allows for a unique name but a fixed path, which might work depending on your situation.
Since right-click and export works, I'm going to guess it's something with the name, not the path. Give it a try and let me know.
The user may, but does so FileMaker Pro?
Yes, Winfried, I'm thinking along the same lines. When I script the export without specifying the path/file name and then manually select the remote volume, I see a message that says, "The file 'sample.png' already exists. Do you want to overwrite it?" However, that file does not already exist -- I'm guessing that this is a symptom of a permissions issue. I can see (empirically) that the user has write privileges to the directory, but not delete privileges. I will delve further with the IT department.
Not delete rightswill hold you up. Good catch!