The simplest way is to create button "Send Email" and let the this script do the rest
Enter Browse Mode
#Go to the record that you want save
Go to Related record [From Table: "Tablename"; using layout: "email" (tablename); New window]
#Setting destination of PDF you want to save
Set Variable [$file.pdf; Value:Get (TemporaryPath) & "file.pdf"]
#Saving as PDF
Save Records as PDF [Restore; No dialog; "$file.pdf"; Records being browsed]
#Sending the Email
Send Mail [Send via E-mail Client; To: Table::Email Address; Subject: "subject for file;"$file.pdf"]
#Closing the current window
Close Window [Current Window]
hope that helps.
Thank you for your advice gunnerstudio, I am running FMpro version 7 on a mac, and I can't find the set variable option in the scripts ... any ideas?
You will need at least version 8 to make things easy for you.
Because you are using 7, you have to do things with big time work arounds. You can use a global fields instead of variables. You can use a print PDF creation program to create a PDF. You can use a different format such as csv or tab for your Excel export. You can not use the temporary path for export either.
I would recommend upgrading to at least 8.5 or 9.
Thank you MrVodka, I will attempt to get my company to upgrade!