3 Replies Latest reply on Jun 25, 2013 7:48 AM by DillipKumarMahapatra

    Selecting and Sending Formatted List of Names to MS Word

    bokenrosie

      Title

      Selecting and Sending Formatted List of Names to MS Word

      Post

           I've searched and found a few similar thoughts here but not quite what I want to do.

           I have a list of names in a database along with a RSVP Status that says yes, no, maybe, etc.

           I would like to take all the "yes" and "no" names and export them to MS Word.    This will happen many times per day so it has to be relatively quick and automated.

           The two parts I am having problems with:

           1. Telling FM that I only want "yes" and "no" records.

           2. Exporting the names so that they come out in one single column with two carriage returns after each name.  I've played with Labels and blank report but cannot quite get there.

           Thanks so much.

        • 1. Re: Selecting and Sending Formatted List of Names to MS Word
          philmodjunk

               1) perform find that finds all records marked yes OR no. Use two find requests, one for each response or find all yes, return to find mode, specify no and then select "Extend found set" instead of "Perform Find" to get a combined list of Yes and No responses.

          • 2. Re: Selecting and Sending Formatted List of Names to MS Word
            bokenrosie

                 First part helped.  I built a script that takes care of the two find requests.  Thanks. 

                 I need to create a RTF file with the following:  I do not need label formatting because a record with two line Job title would mess that up.  Thanks in advance for any help.

            Bold Name
            Italics Job Title
                 Company Name

            Bold Name
            Italics Job Title
                 Company Name

            Bold Name
            Italics Job Title
                 Company Name

            Bold Name
            Italics Job Title
                 Company Name

                  

                  

            • 3. Re: Selecting and Sending Formatted List of Names to MS Word
              DillipKumarMahapatra

                   You need to create a calculation field having these 3 fields are in carriage return like Name & "¶" & Job Title & "¶" & Company Name & "¶¶".

                   It will store your data in the format like you have mentioned. Then you need to use Export Field Contents script step and can export gas a .doc file. But in this way you can't able to export your data in the formatted way as you have shown. For that you need to write a VB script (for Windows) or Applescript ( for Mac OsX ) which will take this file as input and format the content. You need to run this VB script Send Event script step in Windows and Perform Applescript in Mac Osx script step exactly after Export Field Contents from FileMaker. If you know VB script/Applescript then you can do that. See below link

                   http://qtp.blogspot.in/2010/03/vbscript-format-word-file-document.html

                   I am also not good at VB script/Applescript but in this way you could do it. If you know VB script/Applescript or can explore a bit then you can do it. Hope it may work for you.