Jump to content
Server Maintenance This Week. ×

Opening & Printing Static Docs. with Word via FM?


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

Recommended Posts

  • Newbies

Hi all. I'm pretty new to Filemaker and am stuck on what may be a pretty easy problem. I'd posted this in another topic area a few days ago, but thought this section’s more appropriate.

I'm trying to get Filemaker (9 Advanced) to print documents in Microsoft Word for which I have a reference to the file stored in my Filemaker database (though I could change this set up to import the file, if needed). I'm trying to find a way to open multiple documents and print them with Word 2007 (OS, Vista). Ideally, I’d be able to do a find in the documents, insert page numbers in the footer, and print to Word 2003 (XP) & Word 2004 on a Mac (OS X Tiger), but… Other than the ideal solution of being able to add the page count in the footer, the documents are good-to-go as is (i.e. I don’t need to import data from any fields in my database, mail merge, etc..)

I can’t figure out how to open the documents and then print them without having to specify the exact file location for each document manually. Is there a way to create a script that can get any file path (which I have in a field) from my database, open that document, print it and then do the same process for each record in the found set with the Send Event and a VB script… or any other method? (I’d be glad to use something other than VB, since I’d have to learn how to use it, but am also happy to learn...)

I’ve searched through all of the Filemaker books and web sites/forums I can find and haven’t seen any solutions, so any advice is greatly appreciated!

Link to comment
Share on other sites

Please do not double post. If you need a post moved to another section, just ask a moderator to move it. I have deleted your old post.

Link to comment
Share on other sites

On windows, Send event may be the best option. I would look for the command line switches for "Word" which includes access to macros (is a print macro). You would need to calculate the command that is sent to the command line (would include path to word and the path to your file.)It could be done with VBS but do to security on office 2007 and the window OS it's likly to be more work.

On a Mac, I think you would need to use applesript (send event is windows only, as is vbs).

Link to comment
Share on other sites

  • Newbies

Thanks so much for the reply.

I've read a bit about it now, and command lines (mostly) makes sense; however, one thing I can't figure out is how I can specify the path to the file (i.e. the Word docs). Because, while the path and content of the files don't change, I do need to be able to call on different files (there are about 75 files total). Is there a way to create a variable for this? Or any other method that would work to accomplish this?

Thanks again for a push in the right direction!

Link to comment
Share on other sites

You can specify a calulation for the send event command.(this could be a variable, a value from a field, or any calulated value)

Whatever you specify is sent to the command line. (really it gets sent to the run line, which is almost the same)

Think of the SendEvent command as having filemaker click "Run" on the windows start menu and typing whatever you specify. (Edit: On vista the run command has been replaced with the search box at the botton of the start menu, it will still work the same way.)

Hope this helps.

Edited by Guest
Link to comment
Share on other sites

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