Nicolaus Busch Posted March 24, 2009 Posted March 24, 2009 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?
comment Posted March 25, 2009 Posted March 25, 2009 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.
TheTominator Posted August 2, 2009 Posted August 2, 2009 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.
fseipel Posted August 2, 2009 Posted August 2, 2009 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
Neuronal Nerd Posted August 26, 2009 Posted August 26, 2009 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.
jabrane Posted November 12, 2012 Posted November 12, 2012 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
fseipel Posted November 18, 2012 Posted November 18, 2012 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.
Newbies foodmore Posted August 28, 2013 Newbies Posted August 28, 2013 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 } } }
Recommended Posts
This topic is 4173 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 accountSign in
Already have an account? Sign in here.
Sign In Now