Jump to content

FMP 6 -> Word 2003 via XML


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

Recommended Posts

since word 2003 files are completely XML now, using Word's particular grammar, one can script an FM 6 export and use an XSLT file to create a word document without any other importing or programming. there is an example of this on FileMaker's website. the issue i am having is creating a Word document that has the same number of instances as the number of records exported.

has anyone worked with Word 2003 and FMP much? any tips on transforming the exported file into a word document with multiple instances?



Link to comment
Share on other sites

What do you mean by instances? Do you mean files? Rows? Paragraphs? Pages?

By the way, you can do this with Word 2000, too. Create an a new Word 2000 document, and save it as an HTML file. Then open the HTML file with a text editor (not a word processor; that is, open it with Notepad or UltraEdit or Homesite or something similar). You'll see that the document is based on HTML and XML. If you create an XML/HTML document based on the same structure and name it with a ".doc" extension, Word will open it up just fine.

Link to comment
Share on other sites

yes by instances i mean rows, sorry for the vagarities. i have a script right now that puts together the top and bottom of an XSLT file and loops to Insert Calc Result with an element and a "variable" in the ROW portion for each fmp call for each record. it dumps it all into a Global field and everything is there and works if i copy the contents and paste them into a text document, but if i specify an XSLT sheet as a value of a field in the XML export it creates and empty document.

oh so frustrating

Link to comment
Share on other sites

  • 4 weeks later...

Here's a trick that works quite well:

Copy your found set results into a Global text field, format it as valid HTML code. Then create a found set of one record, then export just the global field to a .TAB file and set the file mame as 'file.DOC'.

This will open with Word 2000 or later.

You can even format the text using HTML code and the formatting will be preserved in the "DOC" file.

I am also using this method to create XLST files 'on-the'fly':

Create XLST file based on what is needed and XML file to be created.

Output XML pointed at XLST file just created - and...

> Instant web files

> Instant Word documents

> ..just about any text-based output file is possible.

Link to comment
Share on other sites

  • 1 month later...
  • Newbies

While you can certainly write an XSLT stylesheet to generate a WordML file, you can also write an XSLT stylesheet to generate RTF text, which is much more universally digestible by nearly any word processing program on the market. For a wide range of such documents, you might find EZxslt helpful in generating the XSLT for you - which would also defer the need to either learn RTF yourself or really master XSLT yourself. For more details see:


Link to comment
Share on other sites

This topic is 6465 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.