July 19, 200718 yr I made some form letters in different layouts with merge fields. They are great for printing. But I would like to email them, is there a way to do this? Thanks
July 20, 200718 yr Print to pdf and send the pdf as an attachment. Otherwise make a calc field with the merge fields in them and send an email with the calc field.
July 20, 200718 yr Author Thank you Taking that further,. Is there a way to print that pdf and send the print to a container field so it could be emailed through a script and addressed etc. Thanks Dave I am not sure if container fields can be automatically emailed. I am just looking for a way to automate the sending of the pdfs to different addresses in my file. Edited July 20, 200718 yr by Guest
July 20, 200718 yr No need to send it to a container. You can attach it to an email using the send mail script step. First you will have to save it to a location using save records as pdf. Then using the send mail script step you can attach that pdf to an email. It should open your default email for your computer. If you have the email stored in a field, you can also have it open an email with pdf attached to the specified email listed in your email field. Check the script steps Send Mail. Save Records as PDF. Michael
July 20, 200718 yr Author I have some graphics in my layout and I have merged fields in a letter that I have written. IF I invoke the send mail it will send the same file each time.. You see, each record is technically a different layout (letter) BECAUSE OF THE MERGED FIELDS. So How can I automate sending this letter as a pdf which changes with each record to 25 different emails ( or any number of emails) ? I want the whole thing to be automatic without my input at the time of emailing. Thanks
July 20, 200718 yr Create a calculated text field that builds the merge text for each letter. Then e-mail this text to each person. Unfortunately the e-mails will be text-only and not html (no images etc). If you get smart, the letter text can be in separate table -- see a merge letter demo I posted to the forums a couple of years ago when FMP 7 was released.
July 20, 200718 yr Author that would be a nice touch for filemaker to add the ability to print to pdf email with a field for mailing to different people . It is so close to being automatic it is sinful. I like your idea but i would like to have the header images of my file. i was so excited - for a while i thought this could be done and automated---- ;)
July 20, 200718 yr You can do what you want to do, but it is 2 steps, as AudioFreak says. 1. First, calculate a path and set it into a script Variable. Or you can create an unstored calculation field, and set that into the script Variable (about the same thing, but the calculation is easier to see if you got it right; though Data Viewer can also show you). The calculation should include unique data from the record, such as an ID; because you're going to loop this, creating many PDFs in the same folder. 2. Save as PDF, using the Variable as the file path. 3. Send Email, using the Variable as the attachment path; i.e., same as above 4. Enclose in a Loop for the found set. 5. This is going to put a lot of PDFs into a folder somewhere, like on your Desktop. Which means you've got to create that folder first (or use a Perform AppleScript step to create it). Then, if you don't want them, you'll need to either manually delete the files, after sending the emails -!, or use a Perform AppleScript step to remove or delete them (the former will not put them in the trash, the latter will). An alternative is to save them all to the temporary items folder(s), which will then delete them automatically the next time you restart the computer. There are a few folders which could be used; each Account on Mac OS 10 has their own. To see your possibilities, run a simple AppleScript in Script Editor: path to temporary items as text -- "Macintosh HD:private:var:tmp:folders.501:TemporaryItems:" -- it will be 501 for the 1st account created on the computer, but 502 for the next, etc. -- or path to temporary items as text from user domain -- "Macintosh HD:Users:fej:Library:Caches:TemporaryItems:" -- has the short user name; not sure when this is cleared, probably restart You could run this in a Perform AppleScript step, so it can be discovered from FileMaker, set into a global field (best to put it on the current layout), translated to a FileMaker syntax path (add "file:/", ":" to "/") then set into the Variable. Unfortunately AppleScript cannot directly read/write from/to a script Variable. Yes, FileMaker could add the option to make it easier, but it's not that hard either.
July 20, 200718 yr Author Thanks very much for a great answer. I am going to try that today with a sample file. I appreciate your thought and time. Dave
Create an account or sign in to comment