3 Replies Latest reply on Jun 27, 2013 9:52 AM by philmodjunk

    Email Invoice Script



      Email Invoice Script


           After many ours of trying to access my old program, I am finally able to edit the buttons. The biggest thing my clients ask me is to email the invoice to them. In the starter solution is a perfect example of what I am trying to accomplish. I copied and pasted the script but it is giving me an error:


           "$PATH" COuld not be created on this disk. Use a

           Diffrent name, make more room on the disk,unlock it or

           use a diffrent disk.


           After i click OK, it opens up my outlook with the proper Address and subject without an attachment.


        • 1. Re: Email Invoice Script

               The $Path variable is not created and given a value in your script due to the path calculation being enclosed in /* comment brackets */. FileMaker does this for a calculation inside a script step when it is pasted if there is some error in that expression for the file into which you pasted it. You'll need to remove the comments and then correct what caused them to be added during the script paste.

          • 2. Re: Email Invoice Script

                 I edited the Value to Value: "File:" & Get ( TemporaryPath ) & "Invoice.PDF" as i read, i think, on your older post. However, I still cant seem to get the PDF attached. I also do not want to save the PDF file to my computer I just want to create one and send it. The starter Solution works well.

                 BTW: Rookie at Filemaker and Programing

            • 3. Re: Email Invoice Script

                   You have to save the file before you can attach it. Until you save the file, there is no file to attach after all. But by saving to Temporary Items, the file will not persist so that you don't have to do any "housekeeping" to keep a bunch of files from building up.

                   Once you have used $Path to save the PDF, you can open the dialog for Send Mail, click the attachment check box and enter $Path (no quotes) directly into the dialog that then opens. THis should then attach the PDF your Save As PDF step created to the email.