Newbies knight Posted September 26, 2005 Newbies Posted September 26, 2005 I hoping someone can give me a roadmap to do the following... I'd like to create a database that can export information to Word, where the final editing will be done. For example: In the database, the user would be asked to select via checkbox: "The color of the sky is (a) blue, (: green or © red." Say, the (a) checkbox is selected, the Word document would have a statement "The color of the sky is blue". If the user edits the Word document to, say, "The colour of the sky is magenta", I will NOT need the changes reflected in the database. Creating the series of statements with checkboxes is not a problem - my problem is how to export to Word. Any help would be appreciated. Thanks.
Sanjai Posted September 26, 2005 Posted September 26, 2005 I haven't worked on it but I remember doing some R&D with word 2003. By exporting the data in xml format using FMPXMLRESULT grammar and using word to read the grammar for the required output. To retrieve the final text "The color of the sky is blue", you will have to store the final output in a field in FileMaker Pro and export this field. Second solution which I have tried is to export the final output to a csv file. Create a Visual Basic exe to read the text and write it to a .doc file. Call the exe from within FileMaker Pro after exporting the data to the csv file. This would work with all the version of word and the size of the vb application would not be more than few kbs. I am sure someelse would be able to give you a better solution.
Newbies knight Posted September 30, 2005 Author Newbies Posted September 30, 2005 Thanks for the reply, Sanjai. Does this mean that my entire report (which I simplified as "the sky is blue") has to be stored in a single field? A typical report is about 20 pages of text. Any suggestions from anybody else?
BobWeaver Posted October 4, 2005 Posted October 4, 2005 I have exported data from multiple records as rtf formatted data which can then be read directly by MS Word as a formatted Word document. It works very nicely once it is set up, but the setup can be a bit messy depending on how complicated you want the document format to be. I posted some info on doing this a few months ago. Here is the link: http://fmforums.com/forum/showtopic.php?tid/158542
Sanjai Posted October 4, 2005 Posted October 4, 2005 Bob, Great work. Thanks for sharing your previous post. I have done a similar thing to export in html format. I couldn't understand "To export multiple records as one document, it gets a bit more messy. You have to break the original rtf template data into pieces: preamble, body and postamble (figuring out where to split it, is the tricky part). and then include the preamble with the first record only, and include the postamble with the last record only. " But let us first answer Knight's question. I believe if Knight takes your solution then he still will have use one global field to export his report. Am I right?
kiwiora Posted October 19, 2005 Posted October 19, 2005 you can export as a simple merge file and insert the field into word via merge which is what I do. for example: If in FM field name is "colour" In word: CTRl + F9 to get the parentheses and type mergefield colour which will look like { mergefield colour } Upon merging the data (mer file from filemaker) and the form file (word file) the result will be automatically inserted. If you want it as a table use directory (for one row after the other) otherwise merge it as a form file for a section break between each record.
krdzine1 Posted November 2, 2005 Posted November 2, 2005 Has anyone exported fields pre-tagged with styles for Word (or Indesign is my preference)? I want to be able to export a series of records from FM to an importable format with styles so it expedites the layout process? In the past I've been able to export to word and perform a merge into pre-styled areas and then save THAT file for importing into InDesign/Quark. I'd like to skip the middle-man if possible. Any ideas?
BobWeaver Posted November 2, 2005 Posted November 2, 2005 I've done this with with the rtf format files that I mentioned above. I developed a formula which takes the styled text directly from a standard text field and converts it to rtf tagged text. At present it only recognizes bold italic and underline, but could be expanded to include font type and size. Also, sorry for not replying to Sanjal's comment earlier. There was a problem posting to the forum at the time, and I have been back since it was fixed. Sanjal, you could use either a global field or regular text fields. The solution I implemented uses regular fields, and exports multiple records into the rtf file.
krdzine1 Posted November 2, 2005 Posted November 2, 2005 The bold, italic aspect of "style" is not really what I'm after. In Word (and InDesign) you can choose a paragraph style (like Header1, etc). When the style is "tagged" with that style and imported into a layout program like InDesign or Quark the content is imported and the styles are applied (as defined in InDesign). This speeds up the layout process and allows universal changes to content of the same style in the document. Exporting with RTF settings won't really offer that option.
BobWeaver Posted November 4, 2005 Posted November 4, 2005 (edited) In previous versions of Filemaker (6 and earlier), the only style information that was available if you copied to the clipboard etc. was font/fonsize/bold/italic/underline information. The paragraph formatting was lost. I'm not sure if the GetAsCSS function in versions 7 and 8 will retrieve the paragraph format or not (I use GetAsCSS as the first step in creating the rtf tags). I haven't played with that. If you just want to predefine a limited number of paragraph formats which the user can select from a menu, then you can create the appropriate tags for them and store them in a field in the database. Then, when you want to export, you would have a calculation that concatenates the selected formatting tags to the text. That is what I do in the one solution that I developed. Different tags are stored for page header, page footer document section header, subsection header, and body text. The export script and some calculation fields assembles and exports the whole thing into one big chunk of tagged text. It even includes the graphics for the company logo. The best way to approach this is to create a template document in the target application (Quark, Pagemaker or Word) and save it as a tagged text file. Then you can open it in a plain text editor and copy the tags from there directly into a field in Filemaker. Edited November 4, 2005 by Guest
BobWeaver Posted November 4, 2005 Posted November 4, 2005 Here is an example file that shows how the styled text can be converted to rtf tags: http://www.fmforums.com/forum/showtopic.php?fid/25/tid/171240/pid/181772 I'm working on an example that adds the paragraph formatting tags and exports the whole thing to MS Word, but it's somewhat involved, and I haven't had a lot of spare time lately.
Steverino Posted November 6, 2005 Posted November 6, 2005 You can try Chaparral Software's product -- check out http://www.chapsoft.com/ezxsit.
Brudderman Posted November 7, 2005 Posted November 7, 2005 (edited) I've done this by tagging certain sections of an export file with codes resembling HTML tags. Then the export goes to a text file. Then from FM a SendEvent script opens a Word DOT template with VBA code that auto executes. This code imports the text file into Word, looks for the tags, then replaces the tagged text with the designated Word style (such as Heading 1), and finally exports the finished product to a separate Word file. As I recall, I set three different styles in Word from three sets of exported tags. Though I haven't tried it in the newer versions of Word and FM, I used it often with about 300 pages of exported text. In recent days I've been working to avoid this with XML/XLS to get an RTF file but still haven't been able to get the two column format that I really want. I do want to examing Bob's interesting RTF post. But the tagging works if you're willing to delve into Word VBA. Here's a sample of the VBA code that locates the tags that are then replaced with Heading 1: With rSelection.Find .ClearFormatting .Replacement.ClearFormatting .Text = "*" .Replacement.Text = "^&" .Replacement.Style = ActiveDocument.Styles("Heading 1") .Forward = True .Wrap = wdFindAsk .MatchCase = False .MatchWholeWord = False .MatchWildcards = True .Execute Replace:=wdReplaceAll .ClearFormatting .Replacement.ClearFormatting End With Is this the kind of thing you want to do? James Edited November 7, 2005 by Guest
Newbies buffalo2 Posted April 26, 2006 Newbies Posted April 26, 2006 I appreciate your posts, Mr. Weaver. I have what I think is a simple question and since you are on the same platform perhaps you can give me a simple solution. I want to export a FM6 database of addresses directly into MS word 2004 to prepare a member directory. Is there a simple way to do this?
Recommended Posts
This topic is 6787 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