11 Replies Latest reply on Nov 19, 2009 3:54 AM by ianmanning

    Inserting Pages Documents

    Thoughta

      Title

      Inserting Pages Documents

      Post

      I'm on a Mac and am writing my first runtime application. My company provides marketing services to the music industry and we need to store contracts, music, marketing materials and the like in large volume. Each worker will be able to store their own work, export and import media items from and to co-workers and clients.

       

      On the media layout I have a container, an insert button and various fields (title, date, type, category, etc). In Browse Mode, if I select the individual record's Container field and click the Insert button a Finder window opens for me to navigate to the image or document I want.  I have the "Store as a reference. . ." checked. Everything works when I'm selecting an image, audio file, PDF or Word.doc file, but not a .Pages document. I have my .doc files set to "always open with" Pages, which they do if I'm double clicking them from the Finder, but from within the FM container they boot Word. I create all files in Pages and then Export into .doc so I can distribute to people using either platform, so this doesn't work for me. When trying to insert the original .pages files I get the error message: "This file cannot be inserted because it contains other files inside it."

       

      Is there some way to get this working they way I need it? 

        • 1. Re: Inserting Pages Documents
          TSGal

          Thoughta:

           

          Thank you for your post.

           

          Unfortunately, I am unable to duplicate this problem.  I found a machine that has Pages and Microsoft Word.  All of the .doc files are set to open with Microsoft Word.  Here are the steps I took:

           

          1. I launched Microsoft Word, entered a sentence, and saved it as "Test.doc".

           

          2. I launched FileMaker Pro 10 Advanced, created a new database file "Test.fp7" with the following two fields:

          Name (Text)

          Container (Container)

           

          3. In Browse Mode, I entered one record:

          Name: TSGal

          Container: Test.doc (save as reference)

           

          4. I double-clicked Test.doc in the "Container" field, and Microsoft Word launched.

           

          5. I closed the file, pulled down the Tools menu and selected "Developer Utilities..."  I added the file, made all the changes and created a runtime solution "Test".

           

          6. I quit FileMaker Pro, launched "Test", double-clicked Test.doc in the "Container" field and Microsoft Word launched.

           

          7. In the Finder, I clicked once on Test.doc, pulled down the File menu and selected "Get Info".

           

          8. Under "Open with:", it states "Microsoft Word".  Using the pull-down, I selected "Pages" and "Change All" to change all .doc documents.

           

          9. I then double-clicked on the Test.doc file in the "Container" field, and Pages launched.

           

          I'm not sure what else to try here.  Let me know what I'm doing differently than you.

           

          Which version of FileMaker Pro Advanced are you using?  Also, what version of Mac OS X are you using?  I'll try to duplicate the problem using the same environment.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Inserting Pages Documents
            Thoughta
              

            TSGal:

             

            Thank you for your reply. 

             

            Here are the differences between what you tested and what I've experienced:

             

            1. Create "FaxCover" in Pages. Perform "Save as" to hard drive (5 hierarchal levels down)

             

            2. Export "FaxCover" as Word.doc, saving to same folder location as above. 

             

            3. Launch SMdb.fp7, a FileMaker Pro 9.0v3 Advanced file 

             

            4. Go to layout "Media" (Media is also its own table with a "Media" Container field)

             

            5. Click the "insert" button. Script name "Insert Item"contains 1 script step: "Insert File [Reference; MEDIA::media]"

             

            6. Finder opens hard drive window

             

            7.  Navigate to "FaxCover.pages" and select

             

            8. Error dialog box appears "This file cannot be inserted because it contains other files inside it."

             

            9. Click "OK" to remove dialog box

             

            10. Click the insert button. Finder open hard drive window

             

            11. Navigate to "FaxCover.doc" and select

             

            12. Reference link is inserted into Container.

             

            13. Double click reference link - document opens in Word

             

            14. Delete the reference link

             

            15. Click the insert button. Finder opens hard drive window

             

            16. Navigate to images folder. Select an image

             

            17. Reference link to image is inserted into Container.

             

            18. Double click reference link - image opens

             

            19. Delete the reference link

             

            20. Click the insert button. Finder opens hard drive window

             

            21. Navigate to audio folder. Select an audio file.

             

            22. Reference link to audio file is inserted into Container.

             

            23. Double click reference link - audio file and iTunes open. Music plays.

             

            24. Delete the reference link

             

            25. Click the insert button. Finder opens hard drive window.

             

            22. Navigate to a folder with Pages documents. Select one randomly. 

             

            23. Error dialog box appears "This file cannot be inserted because it contains other files inside it." 

             

            24. Click the insert button. Finder opens hard drive window.

             

            25. Navigate to .doc document that "always opens with" Pages. Select document

             

            26. Reference link to image is inserted into Container.

             

            27. Double click reference link - document opens Word and is displayed

             

            28. Delete the reference link

             

            29. Click the insert button. Finder opens hard drive window

             

            30. Navigate to 7 different folders which contain Pages documents attempting to insert any

             

            31. Consistently receive error dialog box stating "This file cannot be inserted because it contains other files inside it."

             

            My configuration: Mac OS 10.5.7. MacBook Pro 2.4 GHz Intel Core 2 Duo processor. 4 GB 667 MHz DDR2 SDRAM. 24" Cinema Display. Apple keyboard. Kensington trackball.  

             

            Any and all information is appreciated. I'm simply stumped.

            • 3. Re: Inserting Pages Documents
              TSGal

              Thoughta:

               

              Thank you for the information.

               

              I'm not sure what you included in your "FaxCover" document, but since FileMaker displays that there are other files, I'm assuming your document is a "bundle".  From the Finder, right-click your "FaxCover.doc" and see if you have the option "Show package contents".  If so, then you have a document that includes one or more files.  I'll assume there is an image file attached.  If this is not the case, then I would like to see the file.  I have sent you a private message (top of this page - right side - X Messages) with instructions where to send the file.

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Inserting Pages Documents
                Thoughta
                  

                TSGal:

                 

                Thank you for your reply.

                 

                If I understand what your saying Pages documents cannot be inserted into a FileMaker Container as a referenced link because all Pages documents have the same 3-4 "package contents": 

                 

                Contents - containing the document name

                Zip file - index.xml.gz

                Image - reference path to image

                Quicklook - thumbnail.jpg of the document 

                 

                None of my Pages documents will insert into FileMaker (also see #22/23 and #30/31 of my previous response) whether they are a single page text only document with no custom formatting or contain a single image (like a company logo) 

                 

                So the workaround for Mac users would be

                 

                1. exporting their Pages documents into Word.doc files

                2. inserting the .docs as reference links into FileMaker

                3. double-clicking on the .doc links and then using the "open with Pages" feature to access the document in Pages

                 

                Am I understanding you correctly?

                 

                Thoughta 

                • 5. Re: Inserting Pages Documents
                  TSGal

                  Thoughta:

                   

                  I don't know what is entailed with a Pages document.  I created sample Pages document only entering "This is a test" as the contents.  I can save the document as a Word document, and I'm able to put the file into a Container field.  I do not get the message.  If there is an image inserted, then from your description, it appears Pages add some files to the document bundle.

                   

                  When I go back to the machine that has Pages, I see under Preferences the option to "Save new documents as packages".  If you uncheck this option, you may get the desired results. Please let me know if this works for you.

                   

                  TSGal

                  FileMaker, Inc. 

                  • 6. Re: Inserting Pages Documents
                    Thoughta
                      

                    TSGal:

                     

                    Thanks again for your reply. My original question had nothing to do with Word (except to note there was no problem with it.) Everything works when saving Word, Image or Audio files. Here is what is not working - please try the following and see if it works for you:

                     

                    1. Create a new Pages document using a blank template

                     

                    2. Type in: This is a test

                     

                    3. Save the document to a folder in your hard drive as "This is a test.pages"

                     

                    4. Create a new empty FileMaker database in FileMakerPro Advanced 9.0v3

                     

                    5. Create one Container field: Item

                     

                    6. Enter Browse Mode - Go to the "Insert" menu and select "File"

                     

                    7. Navigate to select "This is a test" file for insertion

                     

                    I cannot insert the file when saved as a Pages document. I consistently receive an error dialog box stating "This file cannot be inserted because it contains other files inside it."

                     

                    So my question is: Can FileMakerPro insert Pages documents into Container fields? Or can it only insert Word documents?

                     

                    Thanks for following through on this.

                     

                    Thoughta 

                    • 7. Re: Inserting Pages Documents
                      TSGal

                      Thoughta:

                       

                      I was able to create this without a problem.  However, when saving the Pages document in step #3 above, I unchecked all options.  That is, I unchecked "Include preview in document", "Copy audio and movies into document", and "Copy template images into document".  If one of these is checked, then the bundle is expanded to include more than one file.

                       

                      TSGal

                      FileMaker, Inc. 

                      • 8. Re: Inserting Pages Documents
                        Thoughta
                          

                        TSGal:

                         

                        Once again, thanks for your reply.

                         

                        I've tried to recreate your success, but I couldn't. I still get the same dialog box with the same message.

                         

                        All the check boxes were unchecked when saving the Pages documents (using a blank template with 2 or three words on it): 

                         

                        The only explanation I can think of is I'm using Pages from iWork '08. Perhaps you're using '09? And although I mentioned it initially, it may be worth repeating here: I'm not trying to store the document in the Container. I'm only trying to store a reference (filepath) to .pages files, the same as I do with .doc, .wav and .jpg files.

                         

                        If you were using Pages from iWork '09, could you check to see if Pages from iWork '08 works the same for you? 

                         

                        Thanks.

                         

                        Thoughta 

                        • 9. Re: Inserting Pages Documents
                          TSGal

                          Thoughta:

                           

                          It took some time, but I was finally able to find a person this morning with Pages 08.

                           

                          I can confirm that a simple file in Pages 08 is saved as a bundle, so you will not be able to add it to a Container field, since FileMaker Pro only allows a single file to be inserted into a Container field.

                           

                          Therefore, either save the files as a Word document, or update to Pages 09 where the problem does not exist. 

                           

                          TSGal

                          FileMaker, Inc. 

                          • 10. Re: Inserting Pages Documents
                            Thoughta
                              

                            TSGal,

                             

                            Thanks for your efforts and the information. I'll upgrade to iWork '09. 

                            • 11. Re: Inserting Pages Documents
                              ianmanning
                                

                              Just a thought, but if you only want to store the file path could you not store it as text and then open it using a script when you need to.

                              You would not need to use a container for this just a simple text field.