Wednesday, November 12, 2008

Create a Button in Filemaker 9 that Saves a PDF and Emails it to an Email on the Record

In Layout Mode:
Goto: Scripts>ScriptMaker...>Perform Script
Click: New
Name the Script Name: Create PDF and Email
Double Click: Save Records as PDF
Check off: Perform without dialog
Check off: Specify output file
Click: Add File..., Navigate to a folder that you will save a temporary PDF, Type a new File Name that is reasonable, such as in my case "Sales Contract", Save
Copy the Output File string to the Clipboard
Do Not Check the Boxes, Automatically open File nor Create email with file as attachment
Click: OK
Check off: Specify Options
Choose to Save: Current Record
Click: OK
Double Click: Send Mail, in the Actions List on the Left under Miscellaneous
Click: Specify...
Click the arrow head at the right end of the To: box and Specify Field Name of the Email Records
Click: OK
Click: Attach File and Specify..., Paste the string from the Clipboard (of the Folder you will store the temporary PDF file)
Click: OK
Click: OK
Close the Script and Save
Close ScriptMaker
Insert>Button...>Perform Script>Specify...>Create PDF and Email
Click: OK
Change the Current Script to: Resume
Click: OK
Change to Browse Mode and Click on the new button
A new Email composition window will pop up with the current record's email address
The PDF attachment should be attached.
Unfortunately, signature information in Outlook do not get added at the end of the email

No comments: