Jump to content
Server Maintenance This Week. ×

Using XML/XSL to MailMerge into Word?


Jalz

This topic is 5233 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

  • 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
Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

This topic is 5233 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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