Opening a Word file from Filemaker Pro Advanced

This is probably so easy that you will laugh me to scorn but I want to run an applescript that will open an MS Word file using the contents of the pasteboard.
The pasteboard will contain the file’s full path and name but I need Word to then open that file using the contents of the pasteboard.
Any advice appreciated or a better solution.

Thanks.

Model: G5 2.7 Dual running OS X Tiger
AppleScript: latest I suppose
Browser: Safari 417.9.2
Operating System: Mac OS X (10.4)

Well, if the file you want to open is a Word document, the following will work:

set filePath to (the clipboard) tell application "Finder" to open file filePath
If, however, the file is a text file that is currently set to open by something else (TextEdit, for example), you’d need to tell Word to open the file.

[code]set filePath to (the clipboard)

tell application “Microsoft Word”
activate
open (file filePath)
end tell[/code]
At this point you run into the exciting behavior that if Word is not running, you’ll get a failure. If, however, you have Word running without the “templates” dialog, the file will open properly. At this point, you’ll have to fight with Word - I’ve lost interest in dealing with a Microsoft app. Took me awhile to realize I had to dismiss the template dialog for the above to work. I hate wasting my time fighting with Microsoft products. :slight_smile:

Thanks I will give this a try.
PS I know what you mean with MS Word…

Thanks works a treat.