I want to send subscription invoices to Club members as individualised pdfs attached to an email to each member. The database is a single file and the finding the records and relevant fields is not a problem. However I am having trouble working out how to specify the name and temporary file path of the pdfs to be created using a script to send individualised invoices to a each of the email recipients.
I start with a script that finds the relevant records and opens a layout that sets out the individualised invoice for each found record.
I then started to do another script to create the pdfs and send the emails which runs as follows:
Go to Layout
Go to Record/Request/Page [First]
Save Records as PDF [Restore; No Dialog; (problem - how to name the pdf for the first email recipient The naming seems to be in Specify Options - Save Current Record - Current Record - Options -Title I have checked Specify Output File and Specify Options (problem Specify Output File requires a suitable temporary file path for the pdf yet to be created. No need for the pdf to be retained as the FM record is adequate}
Send Mail [Send via E-Mail Client; To (field in relevant record identifying recipient's email address); Subject: " Blah Blah"; Message: (more "Blah Blah" ); (pdf name as above) Send Mail Options Send via E-Mail Client Create one email using data from the Current Record - Subject - Message - Attach file - Specify file path (problem??)
Go to Record etc [Next]
Repeat Save Records as above (but how do I name each successive email recipient's pdf and describe the file path )
Send Mail (as above)
Go to Record etc [Next:Exit after Last]
Allow User Abort
I hope the foregoing is sufficient to demonstrate my difficulties. Any guidance would be appreciated.