Brian Dunning's FileMaker Custom Functions

fm2word ( input )

Generates Microsoft Word 2003 XML Documents from FileMaker

  Average rating: 4.4 (23 votes) Log in to vote

Jens Teich   Jens Teich
DJTO
http://jensteich.de

Share on Facebook Share on Twitter

  Sample input:
#

#Hello World!#

#
Second Paragraph.#

#
Third Paragraph!#

#
  Sample output:
Hello World!Second Paragraph.Third Paragraph!

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Create MS Word Documents (XML 2003) from FileMaker.


The expected input is a text with tags:

* #

# - start paragraph
* #

# - end paragraph
* #

# - end + start paragraph
*
* #

# - tables
* #
#
* ##
* #
#
* ##
* #
#
*
* #
# - section break, continuous no new page
* ## - section break starting two column page layout
* ## - section break starting three column page layout
*
* ## - bold
* #
#
* ## - italics
* #
#
*
* ##
* #
#

Export result into a textfile with extension '.xml'[*] and it can be opened in MS Word, OpenOffice, Libre Office, ...

On Windows the resulting file shows the MS Word Icon and starts MS Word on double click. On MacOSX the resulting file can be opened with Word (or OpenOffice and friends).

Author: Jens Teich, http://jensteich.de

__
Do not use FileMakers XML export, just use a text format like text-with-tabs and rename the resulting file with extension 'xml!'

 

Comments

Bruce Robertson   Bruce Robertson
Apr 17, 2015
Interesting.
Might be nice to have an English language version.
Or at least mention that SetzeVar = Let and Austauschen = Substitute
 
Jens   Jens, Hamburg, Germany
Apr 17, 2015
Sorry. Corrected this. Now everything English.

Jens
 
kobu   kobu, tokyo
Apr 20, 2015
Very interested. Please tell me when working with photos, sample input.

thank you.
 
Jens   Jens, Hamburg, Germany
Jun 4, 2015
Sample file is here http://jensteich.de/wp-content/uploads/2015/04/test-word-transfer.fmp12.zip, showing usage (including image example).

Regards
Jens
 
kobu   kobu, tokyo
Jun 12, 2015
thanks for your kindness.
I noticed your sample today
I will try your sample.

thanks.
 
Doug Staubach   Doug Staubach, Denver, Colorado, USA
Sep 25, 2015
Hi Jens!

Nice function and nice demo, thank you!

Tip: I noticed that if I change the filename in the demo to end with ".doc" instead of ".xml", the document that gets created will open just fine with MS-Word (Word will recognize that the document was saved in xml format, and will open it in compatibility mode).

(I'm interested in trying this technique for Excel documents!)

Thanks,
Doug
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.