8 Replies Latest reply on Nov 30, 2013 3:30 PM by ChristopherFord

    can I export a layout as rtf?

    AndreasvanHaren

      Title

      can I export a layout as rtf?

      Post

      I made some nice layouts that can be printed, but I would like to work on the texts more in my word processor. SO I need to have a textfile that I can open again. Is it possible to export as rtf or doc?

       

      André

        • 1. Re: can I export a layout as rtf?
          raybaudi
            

          Hi André,

           

          what about saving as PDF ?

          • 2. Re: can I export a layout as rtf?
            AndreasvanHaren
               But I cannot open a pdf in my wordprocessor on my windows machine. I use Atlantis Wordprocessor.
            • 3. Re: can I export a layout as rtf?
              raybaudi
                

              I suggested PDF because you said: "I made some nice layouts ..."

               

              Now it seems that your layout contains a single text field that you want to edit more...

               

              If that is correct, the text field can be exported ( right click when the cursor is inside that field ) with wichever extension you want and even open automatically your app.

              • 4. Re: can I export a layout as rtf?
                Orlando
                  

                Hi André

                 

                An alternative could be to use a global field and effectively rebuild the layout using a calculation, it wont be perfect as formatting will be lost with this approach but you can then tidy it up in your word processor app after.

                 

                So you would run a script that has a Set Field step that builds up the way you want the document to be composed, this is the hard bit and will take a bit of time to sort correctly, so something like this:

                 

                "Label 1: " & TABLE::Field 1 & "" &

                "Label 2: " & TABLE::Field 2 & "" & ...etc

                 

                And then the next step is to Export Field Contents, pointing to your global and specifying a file path using a Variable if you want, so the final script might look like this:

                 

                #
                Set Variable [ $FilePath ; "filemac:" & Get ( DesktopPath ) & "FileName.txt" ]
                Set Field [ TABLE::Gloabl ; "..." ]
                Export Field Contents [ TABEL::Global ; $FilePath ]
                # Clear Global
                Set Field [ TABLE::Gloabl ; "" ] 

                 

                I hope this helps or gives you an idea, let me know if anything needs further explanation. 



                • 5. Re: can I export a layout as rtf?
                  Orlando
                    

                  Also there is this as an option if you were using Word.

                   

                  http://www.chapsoft.com/ezxslt/ 

                  • 6. Re: can I export a layout as rtf?
                    glowboy
                      

                    Hi,

                     

                    Thanks Orlando, for the clue to solving my "different" problem of generating dynamic filenames. I had overlooked the use of a variable which I now find I can reference in the "Specify File Output" dialog of the export script step.

                     

                    Excellent!

                     

                     

                     Many thanks ;)

                     

                    • 7. Re: can I export a layout as rtf?
                      AndreasvanHaren
                        

                      Thanks,

                      I decided for the easiest way: print to pdf, copy and paste in my word processor. Not a really nice workflow but it works.

                       

                      André

                      • 8. Re: can I export a layout as rtf?
                        ChristopherFord

                             This should work for all mac versions of Filemaker 7-12+...
                             Just change the "RichTextExporter.fmp12" to your database file-name

                             
                             The Table's Fields

                             RichTextExporter::text -----Text
                            Here is where you have the filemaker rich text you want to export
                              

                             RichTextExporter::text2 -----Text
                            This is the field you use for temporarily storing the CSS-Text

                             RichTextExporter::selfLocation -----Calculaltion
                                 Substitute ( (Substitute ( Get ( FilePath ) ; "file:/" ; "/Volumes/" )) ; "RichTextExporter.fmp12" ; "" )


                        The Script


                        Set Field [ RichTextExporter::text2; GetAsCSS ( RichTextExporter::text ) ]
                             Export Field Contents [ RichTextExporter::text2; “file:RichTextExporter.htm” ]
                             Perform AppleScript [ Calculated AppleScript:
                                 "set Source to \"'" & RichTextExporter::selfLocation & "RichTextExporter.htm" & "'\"" & ¶ &
                                 "set Dest to \"'" & RichTextExporter::selfLocation & "RichTextExporter.rtf" & "'\"" & ¶ &
                                 "set ShellScript to \"textutil -cat rtf \" & Source & \" -output \" & Dest" & ¶ & "set theReturn to do shell script ShellScript" ]



                             Happy Database Engineering