How do I send a report as a pdf via email
I want to be able to create a script that I can just click on button that will send out an email with attached layout as a pdf file.
First see this thread on how to use a $Path variable to save a PDF.
Then when you add the send mail script step to the same script, click the "attach" check box and type in the name of your $Path variable without quotes to use the $Path variable specified when saving your PDF as the means to attach that same PDF to the email.
Hi, so this is how I set it up. The PDF will be created and stored in a temporary folder. When the computer restarts the folder should clear out. But when I perform the script I receive and error message...
"“FileName.pdf” could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk."
Sorry, but I left out a link in my last post: Found Sets to PDF with unique file names
For some reason, you have text for two different file paths combined to produce an invalid file path. Use just:
Get (TemporaryPath ) & "FileName.PDF"
for your file path. I don't think that you even need to put it as:
"file:" & Get (TemporaryPath ) & "FileName.PDF"
In the Value field I am putting Get (/Users/Dan/Documents/mac ) & "FileName.pdf" and it is not accepting it. Not sure what I am doing wrong...
Why would you use that expression. Why not use what I have recommended? If you look up Get functions in FileMaker help, you'll see that there is a list of acceptable parameters that you can use with a get function. TemporaryPath is a valid parameter. /Users/Dan/Document/Mac is not a valid parameter and I don't see why you would attempt that expression in the first place. The whole point to:
Get ( DesktopPath )
Get ( TemporaryPath )
Is to return a valid file path for any computer (and user) that currently has your database open.
I got it working!!! Kept digging through the link you provided. Thank you!!!
Retrieving data ...