3 Replies Latest reply on Jul 16, 2013 12:14 PM by hosseinfarmani

    Report to pdf to email

    crtopher

      Title

      Report to pdf to email

      Post

      Hi

      I have read this post 

      http://forums.filemaker.com/posts/e019cbdb2e

      but am unable to really follow it being a FMPro10 newbie and a bit of a general dummy!

      I want to have a button on a report that saves the the report as a pdf in a certain folder with a specific name that will change every time i generate the report (different search dates); then attach that pdf to an email via the smtp function (ie gmail address)

      I can get it to a stage whereby the email is generated with an attached pdf but the pdf has the same name each time thus wiping out previous pdf i want to save. Is there a way to bring a dialog box into it that asks me to enter the filepath/name for the pdf, then attach that pdf to the email

      Cheers

      Chris

        • 1. Re: Report to pdf to email
          philmodjunk

          The key detail from the other link is this:

          Set Variable [$FilePath ; "filemac:" & Get ( TemporaryPath ) & $ActiveName &  "Report.pdf"]

          modifying it to fit your described set up and to make the basic syntax cross platform:

          Set Variaable [$FilePath; "File:" & "Path to enclosing folder in quotes/" & YourTable::YourFolderNameField & "/" & YourTable::YourFileNameField & ".PDF"]

          "path to enclosing folder" will differ with your platform, but will represent that part of the filepath that is the same for all your possible PDF folder locations. If these are different folders on your desktop, you can use Get (DesktopPath) for this part. The part where you specify a folder and file name can be a single field with both items entered, separated by a / or you can enter this data in separate fields. I suggest separate fields with the folder name selected from a value list of folder names as this name must be the name of a folder that already exists.

          • 2. Re: Report to pdf to email
            crtopher

            yep, brilliant, this is the way i will go

            • 3. Re: Report to pdf to email
              hosseinfarmani

                   HI phil, 

                   can i hire you to do this for me?  I am not a  FM programmer.  I just need to create certificates in PDF and email it to the winners of our competition.