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.

Creating template-based docs in Word from FMP

Featured Replies

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!

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?

instead of writing the macro in Word (which has all sorts of security implications and might require code signing) you can write the same thing in VBscript and have FM execute that.

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)

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.