3 Replies Latest reply on May 29, 2014 8:22 AM by philmodjunk

    Exporting records to Word for mail merge

    Badam

      Title

      Exporting records to Word for mail merge

      Post

           I am trying to populate an existing MS Word document (actually many documents but one at a time) with information from a FileMaker 12 database using a MS Word mail merge. A number of the fields that I am exporting are in portals. Is there a way to export the row as of portal and the data from the current table? I am trying to export these records and then do a mail merge rather than trying to recreate each of the Word documents in Filemaker since this would involve more than 100 documents .

           The end result I looking for (for one document) as an example would be in 3 or more section:

           The first would be a section of information about the project (all field in the current table)

           The second section would be a list of the events to take place (rows of portal 1 from a table called Events)

           The third section would be a list of detailed steps to complete each items in section 2. (rows of portal 2 from a table called Details)

        • 1. Re: Exporting records to Word for mail merge
          philmodjunk

               I don't know if Word can import it, but what you describe sounds like three separate exports to 3 different Merge files--the file format set up for MS Word mail merges many years ago.

          • 2. Re: Exporting records to Word for mail merge
            Badam

                 Phil,

                 Thanks as usual for your insight on this!!

                 In looking into this further I see a number of limitations using an export and mail merge approach. If I were to create a layout for printing these forms within FM is it possible to include more than one portal (2 in this case) in the body of a layout used for printing? Both of these portals will vary as to the number of rows that each of them contain for any given record. So that the result again would be the 3 section originally described:

                 The first would be a section of information about the project (all field in the current table)

                 The second section would be a list of the events to take place (rows of portal 1 from a table called Events)

                 The third section would be a list of detailed steps to complete each items in section 2. (rows of portal 2 from a table called Details)

                 I am assuming the body is the correct layout part to put the portals since they will expand or contract as needed?

            • 3. Re: Exporting records to Word for mail merge
              philmodjunk

                   It's possible, but I don't have a clear enough understanding of your relationships nor of your report to be sure.

                   If I were setting up such a layout, I'd try to minimize the use of portals as much as possible when setting up a layout for printing purposes. That is sometimes done by basing the layout on one of the portal tables and setting up the layout as a list view.

                   Portals do not expand or contract as needed. You can, however, set them to be many rows tall and set them to contract by setting them to "slide up" and "resize enclosing part" in the Inspector.

                   Key facts about sliding layout objects:

                     
              1.           It's only visible in preview mode and when you print/save as PDF...
              2.      
              3.           Sliding fields will shrink but not expand.
              4.      
              5.           All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
              6.      
              7.           Objects in headers and footers will not slide.
              8.      
              9.           Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
              10.      
              11.           Fields will slide up only if Top alignment is specified for it and will slide left only if Left alignment is specified.
              12.      
              13.           Consistent side borders are difficult to achieve with sliding fields.
              14.      
              15.           In FMP13, hidden objects (”Hide object when”) will slide/resize.