Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Can a layout be emailed or exported to a field


This topic is 6336 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted (edited)

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 by Guest
Posted

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

Posted

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

Posted

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.

Posted

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---- ;)

Posted

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.

Posted

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

This topic is 6336 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.