Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi. I want to facilitate the process of writing an MS Word letter based on Filemaker data. I want to get client data into the address block with some other details (products, purchase date etc.). The letter needs some free form text as well so doing it all in FM is inappropriate. I can see how exporting the data to a text file for Word to use in a merge build might work but this seems a little cumbersome.

Any ideas

Many thanks.

Posted

Another option is to save and example of your Word letter as RTF format, copy and paste this into FM, and use script/calculations to incorporate FM fields into the variable parts of the letter. You now have created an RTF document in FM, that when exported and opened in Word gives you a formatted letter.

-bd

Posted

Another option is to setup an ODBC connection between Word and FileMaker. I've done this on the Windows side, but not on the Mac. It works rather well, but is a bit slow. You can search for the "Found Set" directly from within Word, then perform the merge to file or printer.

Posted

Can anyone explain to me how to accomplish the ODBC connectivity process, or where I can read about it. I know absolutely nothing about it or how to start going about it!!

Thanks

Posted

Actually, I have found a good amount of information on this in the FileMaker Help file and in the documentation. It gives you an overview, tells you how to configure the Control Panel (Win), what types of data, and many other things.

Ken

Posted

Thanks for your assistance LiveOak - but how do you export a layout so that Word can open it? There is no "RTF" option under export. (Im using Mac OS9.1) Excuse my lack of perception.

Posted

Sadly, no, there is no export as RTF function. What you have to do is set up, basically, the code for the RTF function. On microsoft's website, they have a specification for RTF language, its a big formatting programming language, its pretty complex, and easy to misformat. If you wnat to build it from the ground up, try that. Otherwise, just type up the letter in word, save it as an rtf, and then open it as text, not an RTF, then you can peer at the guts of it. Just sift through the guts to find the part you want to sub in, and buuild a calculation, that makes text that is all the first section of RTF code & your merge field & the next part of the code & your next merge field, etc, etc... The only warning I'll give you is that the code can get lengthy (and the code that word automatically produces has a lot of unneccesary crap in it), so if its a long letter, you may go over the limit for a text field in filemaker.

Posted

In MS Word, you save you document in RTF format. This gives you the formatting required to tell Word how to format you letter. RTF is all text. Next examine the RTF text to determine where your FM fields would need to go to use this text for ANY letter. Copy and Paste the RTF into a number of Global fields in FM, breaking the RTF formatting between global fields in such a way that you can build the letter. For example, your letter text might be created in FM with the following calculation field:

LetterText (calculation, text) =

GlobalRTF1 & Date & GlobalRTF2 & Address & GlobalRTF3 & Greeting & Letter Body

anyway, I hope you get the idea. The saving of the letter as RTF from Word is just to generate the formatting so you don't have to get a PhD in RTF to figure it out. It's similar to generating HTML in FM, using global fields to store the standard tags and regular FM fields to fill in the variable parts.

Last, you just export the LetterText field as text and open the document in Word.

-bd

Posted

Still, considering the time and effort you have to put into RTF-manipulations..if you say 'the letter needs some free form text as well so FM is inappropriate', to what extend this is free form? My experience is that formatting text on a lay-out and using fields in the way of <<field>>, you can come a long way ahead. Perhaps you have to make some concessions to your formatting in the way that you anticipate longer fields etc. I would not exclude doing it in Filemaker only beforehand.

Harryk

Posted

Did anyone here ever SUCCEEDED attempts to use RTF vice-versa as is told here? I had the not too bad idea to:

1) make a text in word, complete with all the styles and formatting you want, and define the fields in it with some kind of identifier, like MMname MMamount_to_pay, and write it away in RTF

2) open the text with 'recover text' as plain text, pasting it to clipboard

3) and from there to a global in Filemaker

4) searching that global for the MMfields and replacing them with FM-fieldtext (using subtitute)

5 the reverse order

This works fine for one record..for more records you need to strip of the rtf-header junk Word makes in an RTF, and, you have to watch the end of the rtf-file, as there have to be just as many { as there are } (mmm this sounds familiar..)

it sounds rather easy, but when you see the rtf-code you get dazzled, and when you look at the rtf-specs you get ill.

I did not succeed. But the idea itself attracks me, and I'll continue my attempts.

By the way, the way a program like Appleworks handles the RTF is funny; when you look in the code, ALL your fonts that are on your system are listed in the RTF as well as user name/operator..

harryk

Posted

Hmm - RTF is a leetle detailed for me! The letter in question has a lot of free form text that varies - impractical to do within FM - so I think I'll go back to mail merge exports and some automation to put it together.

Many thanks to all who have assisted!!

SB

Posted

Well, the thing about RTF (And I have unfortunately had the experience of programming it in hard code) is that most programs do their darndest o put in a lot of... well... crap. Actually, a pared down, bare bones document needs about ten percent of the header that is in the standard word or AW export. I hear lots of people saying that its bad to try to do it by hand - I actually found my program had fewer bugs, and was easier to read/alter/debug when I assembled the thing by hand.

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