FMPRO-L Archives

November 2011, Week 2

FMPRO-L@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Corn Walker <[log in to unmask]>
Reply To:
FileMaker Pro Discussions <[log in to unmask]>
Date:
Thu, 10 Nov 2011 07:59:09 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
On Nov 10, 2011, at 5:47 AM, Aki Armann Jonsson wrote:

> Is there a way to generate a PDF(invoices) and place it into a container field and send it in an email as an attachment, all within the same script? 
> 
> I am working in Filemaker 11v4 on a Mac and all the files are being served from Filemaker server 11 on a MacMini. It is a multi-user solution. 
> 
> It would also be nice to be able to save the PDF's in a designated folder on the MacMini. 

To specify where you want the PDF saved you'll need to use a variable as the path. e.g.

  Set Variable [$path; Value:Get(DesktopPath) & "yourFileName.pdf"]

The "Save Records as PDF" script step has "Create email with file as an attachment" as one of its options.

  Save Records as PDF [No dialog; "$path"; Create email; Current record]

To then place it in a container field, use the Insert File script step, also relying on the $path variable you created.

  Insert File [YourTable::YourField; "$path"]



The documentation for each of these steps should get you the rest of the way there.

Cheers,
-corn


Cornelius Walker
The Proof Group
http://proofgroup.com/

ATOM RSS1 RSS2