2 Replies Latest reply on Nov 5, 2009 9:16 AM by rjbull

    Curved Text

    rjbull

      I have searched and did not find any help.

      This project come up and needs to be addressed very soon so I do not have a lot of time to dig for answers.

       

      Is it possiable to use VBScript to place test on a curved line. If so please show me how.

      I have named the frame but when I run the script it places the text in the circle.

      I may not be addressing the correct object.

       

      here is the basic code I am working with.

       


      theTemplateFolder = "C:\Documents and Settings\rjbull\Desktop\"
      theTemplateName = "curve1.indt"
      boxToUse = "curve1"
      fullStory = "kjhg kjhg lkuyg kuy"

      Set myInDesign = CreateObject("InDesign.Application.CS2")
      myInDesign.Activate

      'open the template
      set myDocument = myInDesign.Open(theTemplateFolder & theTemplateName)


      Set myPage = myDocument.Pages.Item(1)
      'set myTextBox = myPage.TextFrames.item (boxToUse)
      'myTextBox.Contents = fullStory

      set myTextLine = myPage.TextFrames.item (boxToUse)
        myTextLine.Contents = fullStory

        • 1. Re: Curved Text
          Thomas B. Nielsen Level 3

          This should point you in the right direction. (I dont know VBScript)

          From the script examples:

           

          Rem PathText.vbs
          Rem An InDesign CS4 VBScript
          Rem
          Rem Shows how to add text to a path.
          main
          Function main()
              Set myInDesign = CreateObject("InDesign.Application")
              mySetup myInDesign
              mySnippet myInDesign
              myTeardown myInDesign
          End Function
          Function mySetup(myInDesign)
              Set myDocument = myInDesign.Documents.Add
              myDocument.ViewPreferences.HorizontalMeasurementUnits = idMeasurementUnits.idPoints
              myDocument.ViewPreferences.VerticalMeasurementUnits = idMeasurementUnits.idPoints
          End Function
          Function mySnippet(myInDesign)
              Rem <fragment>
              Set myDocument = myInDesign.Documents.Item(1)
              Set myPage = myDocument.Pages.Item(1)
              Rem Create a rectangle on the first page.
              Set myTextFrame = myPage.TextFrames.Add
              myTextFrame.geometricBounds = Array(72, 72, 288, 288)
              Set myTextPath = myTextFrame.TextPaths.Add
              myTextPath.Contents = "This is path text."
              Rem </fragment>
          End Function
          Function myTeardown(myInDesign)
          End Function


          --

           

          Thomas B. Nielsen

          http://www.lund-co.dk

          • 2. Re: Curved Text
            rjbull Level 1

            Thanks a bunch that will get me moving.

             

            Again Thanks!

             

            Rex Bull

            IT / BTS

            Label Works® – A Navitor® company

            2025 Lookour Dr. North Mankato MN

            P 507.304.6300 x62107

            www.Labelworks.com