3 Replies Latest reply on Apr 22, 2009 7:02 AM by Harbs.

    [CS][JS] page.place and textFrame

    dave mil

      Hello,

       

      page.place("....") allow to import a file and create a textFrame. How can i get The textFrame ?

       

      page.place return a story...

        • 1. Re: [CS][JS] page.place and textFrame
          Harbs. Level 6

          I would normally use textFrame.place(). You have much more control 

          that way...

           

          Harbs

          • 2. Re: [CS][JS] page.place and textFrame
            Dave Saunders Level 4

            page.place(...).textContainers[0];

             

            will do it for you in CS3 and CS4. Before that, you'd use:

             

            page.place(...).textFrames[0];

             

            Although, in the back of my mind is the sense that this behavior changed at some point and that in CS you'd get the text frame -- but I could well be wrong. I'm much more likely to do it the way that Harbs suggests but in recent weeks I have gone this other route.

             

            Dave

            • 3. Re: [CS][JS] page.place and textFrame
              Harbs. Level 6

              Dave Saunders wrote:


              I'm much more likely to do it the way that Harbs suggests but in recent weeks I have gone this other route.

               

              Dave

              Now that you mention it, there are a couple of reasons you might want to use doc.place() or page.place().

               

              doc.place() will give you a loaded icon which the user can click

               

              page.place allows for autoflowing. (although I'm much more inclined to use my own functions for that...)

               

              take care with page.place() because the number of arguments it takes changed between CS and CS2... (the OMV in CS4 is great for these kinds of comparisons!)

               

              Harbs