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.

Create a Word document from FileMaker

Featured Replies

Hi forum,

I am developing a solution called Litlink used to work with bibliographical data on a rather complex level. What I'm trying to achieve is this: the user has defined authors and books and generated so-called "cards" containing quotations and commentary. He has combined a set of those cards into a project and defined the sort order.

Now I want to create a word document that contains the quotations as a paragraph of the style "Quotation", the commentary as a paragraph with the Style "Standard" and the calculated bibliographical reference as a footnote linked to the quotation.

I saw that the word file format is basically a zip-file that contains among other stuff an XML file where all the real magic is stored, but I have no clue how to produce this.

Has anyone done this before? Any helpful hints maybe or better ideas how to achieve this if not by using XML?

This cannot be done natively in Filemaker, because (as you have noticed), the final result needs to be zipped - see:

http://fmforums.com/forum/showtopic.php?tid/200783/

You might consider using the older WordML format, or rtf.

  • 4 months later...

If you use the free ScriptMaster 3.0 plug-in, you can give yourself the ability to Zip a file.

Combine this with XML export and a sufficiently clever XSLT filter and you're all set to create Word's new .docx format.

Scriptmaster has already been suggested as a means of zipping the output. You may want to consider using it with the POI library: http://poi.apache.org/, but its Word support is still minimal for Office 2007.

The new POI preview release supports Office 2007 (OpenXML format); it can read/write Word, Office, and Excel files from Java; so if its jars are registered it opens up some interesting possibilities.

If it isn't essential that Word file generation run on Macs, the use of COM/VBSCRIPT might be considered; easy to read code, easy to generate; total control of content including table generation, etc. http://www.activexperts.com/activmonitor/windowsmanagement/scripts/msoffice/word/ among many other references. To use, place VBScript in a global field, export that field to a file with extension .VBS, and open the file to run it.

An example is attached which generates a simple Word file from Filemaker using a VBScript. If you set filename to .DOC it saves as Office 2003 format; if you set it to .docx, then it saves it in Office 2007/XML format. This runs only on Windows computers.

Generate_Word_File.zip

  • 4 weeks later...

I would like to do this on a mac. Is this possible? I'm not familiar with applescript, but I'd try learning if it can be done.

  • 3 years later...

Hi evyOne;

I m interested by your post and Im happy to found this exempl "geberate word file" , well; In my DB application ,usnig FM pro11, I export records in an .xls file from server ; however , I want to generate Template word file wich conatin records from the excel file ..

I create an excel  macro which do the works ( save records from excel file to word template) But; I want to RUN this "Macro " from the FM DB !! Is that possible?? Thks

Yes, you can either set up an event to run on open, every time the Excel file is opened, or have the on open event check for a signal file or registry entry to determine whether to run macro.  There is no command line switch to run a macro in MS Excel.  Alternately you can launch a VBSCRIPT which can run the macro.  See http://stackoverflow.com/questions/2050505/way-to-run-excel-macros-from-command-line-or-batch-file Other Office apps, such as Access, DO allow you to run a macro from command line, but not Excel.

  • 9 months later...
  • Newbies

considering you need to zip a file, i am not sure about whether this word document add-on c# can generate word files like you need. but it is worth a shot.

here is some sample demo codes:

using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.MSWordDocx;


namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{
string fileName = FolderName + "SampleNew.docx";

REDocument doc = new REDocument(1);

REFile.SaveDocumentFile(doc, fileName, new DOCXEncoder());//save new word

}

}
}

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.