Jump to content
Server Maintenance This Week. ×

Add pdf/.doc attachments


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

Recommended Posts

It is possible to embed those files via OLE on the Windows platform, but not on the Mac.

From the Windows FileMaker Help Index:

When you embed an OLE object in a container field in your database, the object becomes a part of your database. You can embed OLE objects from external files or create them in a container field, using the application of your choice.

The application you choose writes the object directly to the container field and is started whenever the embedded OLE object is edited. When you embed an object from an external file and that file is later edited, the embedded object doesn't change.

Once an OLE object is embedded in your database, you can activate the object to view or work with it.

Link to comment
Share on other sites

While you can't embed them in the file on Mac, you can end up by having a button which will open them in their parent application. For Mac, there is a bit more work. This example is to use with a Microsoft Word file.

Fields you need in your database: A text field called "File Path text"

Scripts you need: A 1 step script to open the word document associated with the record

The script step is:

. Send Apple Event["Microsoft Word","aevt","odoc"]

To set it up like that you:

.. Select the Send Apple Event step

.. Click on "Specify"

.. Select "open document" from the "send the xxx event with" section

.. Click on the Field Value button and specify the "File Path Text" field

.. Check the "Bring target application to foreground" box

.. Check the "Wait for event completion before continuing" box

.. Click on "Specify Application" and cycle through the folders until you get to the Microsoft Word application, select it and click on "Open".

Thats it.

Now, in the "File Path Text" field in your database records, type the full path name of the field from the hard disk down to the file name, for example:

.. RussLap 6G:Filemaker Tests:Forum Questions:Embed Files in FMP:Test Doc Number2

Create a button called "Open Word Doc" and assign the script to it.

Now, when you click on the button, Word will open and then the Word Document "Test Doc Number 2" will open.

If you want to open a pdf file, then you'll need another script targeting Acrobat reader etc...

Russ

Link to comment
Share on other sites

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