Jump to content
Server Maintenance This Week. ×

Creating template-based docs in Word from FMP


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

Recommended Posts

As FM only has limited wordprocessing possibilities (causing problems in case of lengthy documents), I would like to find a solution for automating the creation of template-based documents in Word.

For example, based on the data in FMP I would like to create a letter in Word based on a pre-existing letter template. All the contents of the letter would be merge fields.

Additional problem: it should work cross-platform (Mac & Windows).

I suppose I need to use one of the Get-functions to establish each user's OS (which function is that, exactly?). And how do I proceed from there? Do I use applescript for Mac and VB for Windows? :( I'm pretty new to both of them, so if there are any easier ways to solve this basic wordprocessing issue, suggestions are most welcome!

Link to comment
Share on other sites

First, I would figure out what data sources word can use for doing a mail merge and set that up.

Next, write a script to export whatever records you are using in the merge in a compatible format.

Get ( DocumentsPath ) or Get ( TemporaryPath ) might be usefull.

Then, create a macro in word that will run the mail merge.

Then, Write the script in filemaker to open word, and run the macro.

On windows, this can be done with the SendEvent script step.

On a mac, applescript most likly the way to go. (I have very little experiance with apple script)

The Get(SystemPlatform) command will be usefull for this.

This all will take time to write and trouble shoot. Are you sure filemaker is not able to do what you want internally?

Link to comment
Share on other sites

VBS scripts can be used but, either method can have security problems to deal with. (office 2007 has increased security, it broke one of my solutions that used VBS to interface with Excel, it was fairly easy to change security settings to make it work)

Link to comment
Share on other sites

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