Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using XML/XSL to MailMerge into Word?

Featured Replies

Hi Guys,

I have to write a module which exports data out of FileMaker (names and addresses) and generates a mail merge in Word. I've been investigating doing this with VBScript, but I stubmbled across an xml/xslt example by Jay Welshofer for FM6,where he exports a letter created in FileMaker to a Word document. Is it possible to create a mail merge with this technique to merge multiple records, a header and footer a document? To tak it further is it possible to create a letter in Word (Just coz I know you can create tables etc in word) and add filemaker addresses to it.

We use Word 2007 over here. Dont know which way to go vbscript or xml/xslt? Dont really know either or the pros and cons. - the user just wants a simple button in FM that creates a Mailmerge in Word, its up to me to choose the technology to do this (without plugins)

I've bought the book by Beverly Voth, gonna start reading it

Many Thanks for advice

Jalz

  • 2 weeks later...

You absolutely can. However, and someone correct me if I am wrong, it is either one or the other. You can either export from Filemaker with xml/xsl to a Word document OR you can use the Word mailmerge function to create the document (with Filemaker data exported to xls, tab or csv.)

For me the complexity, repetition and static nature of the export determine my approach. For instance, I have simple letter that is only sent out once a year that contains data from Filemaker. The static portion of the letter (that data which doesn't come from Filemaker) changes significantly each year and the data from Filemaker is not complex (a simple table.) In this instance I choose to export the data from FM to a tab delimited file and use Word to merge the data into the document.

I also have several hundred individual forms that have to be updated by persons outside of my company. While this is only done yearly, the only change in the forms is the data merged from FM. So, in this case I use xml/xsl to export the forms to Word documents and group them in folders by the individuals who will be updating them.

There are some quirks to exporting to WordML, for instance only about half of the people that update the above mentioned forms can actually open the WordML formatted documents. To fix this I wrote a script that would open each file after it was exported and SaveAs a docx.

I am currently working on an example FM database that exports straight from FM to docx. I have the work that creates the document.xml file complete. I am moving on to the zip portion (docx files are actually zip files) and then will go back and work on the header.xml and footer.xml portions.

Hope this answers more questions than is introduces.

Jamie Forbes

Edited by Guest

  • 1 month later...

Both XML and VBscript are valid choices. Both have advantages and drawbacks. Ideally you'd be proficient in both and apply where either one is best fitted.

But in reality it probably comes down to choosing the technology that you feel most comfortable with and that you can use outside of FM too, the technology that brings YOU the most benefit and that fits with the strategic technology choices in your company / clients

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.