I suggest you put the PDF document into a container field and export it to the /temp/ folder as part of the startup or email send script. (But keep track of this process if you do it in the send email so you only do it once). Then when the User sends the email the script already knows where the 'current' copy of the file is located.
I agree that you should keep exactly one copy of this file in a container field as it will make managing any updates to it much simpler.
To specify an attachment in the send mail script step, set a variable to the file's filepath, then click the attachment check box and enter the name of the variable in place of the file name.
Thank you both for your replies, but I am still not sure if I understand the procedure completely. How do I set the file path without exporting it? And then how do I keep from exporting it each time I run the script (as ch0c0halic cautioned against)? Should the container be set up for external storage and then would I use Get (DocumentsPath) to locate file without having to export it? I tried that, but it didn't seem to work...
I have a table of "resources" containing only one record that I have added the container field to. If I give each user a copy of the PDF to put on their desktop, then could I use Get (DesktopPath) in my variable name? It works on my computer, but not sure if it will work on theirs....
Set a variable to the current user's temp folder. There's a get function that will give you that path. Append a file name to that path in this calculation.
Export the the field contents using this $path variable to specify file name and location.
Now enter your loop where you use send mail and $path to send out your email with this attachment.
Files exported to the temp folder will not be retained so your users will not be left with copies of this file on their computer once they quit FileMaker.
Developer hint: there is also a get function for your desktop path. First create this script to use the desktop path so that you can confirm that the file is correctly exported. Once it all works, update your script to use the temporary folder.