2 Replies Latest reply on Aug 27, 2008 6:29 AM by (bstimpson)

    [CS3 / VBS]  TextFrame Problem

      So one of the old scripts I have revised to work for InDesign CS3 has a small problem.

      The script basically converts text into a table w/ some coloring options and so on. The problem is if I run the script with parts of the textframe not showing then it will only format the visible text. If I expand it and show the whole frame then it will work.

      Is there a quick option that I can throw in the code that will include all contents of the textframe so they are all converted correctly without expanding the frame?

      Thanks in advance!!!
        • 1. Re: [CS3 / VBS]  TextFrame Problem
          Level 1
          Do you mean that parts of the text "in the text frame" is overset? If so, then work not on the frame and its text but on the text of the parent story of the text frame.

          • 2. Re: [CS3 / VBS]  TextFrame Problem
            Level 1
            I don't know if I know exactly how the "parent story" works. I've been thrown into the scripting and InDesign world just recently and I'm working with scripts that were previously built.

            Here is a part of the VBScript that decides the users selection, maybe someone can help in telling me how to add the story into this -


            Rem finds the applicable frame and sends it to the ConvertIt function
            Set mySelection = myDoc.Selection.Item(1)
            Select Case TypeName(mySelection)
            Case "TextFrame"
            If mySelection.StartTextFrame.Tables.Count = 1 Then
            End If
            ConvertIt (mySelection.StartTextFrame)'.Texts.Item(1).ParentTextFrames)
            Case "Text", "InsertionPoint"
            If mySelection.ParentTextFrames.Item(1).StartTextFrame.Tables.Count = 1 Then
            mySelection.ParentTextFrames.Item(1).StartTextFrame.Tables.Item(1).Text.Item(1).ConvertToT ext
            End If
            ConvertIt (mySelection.ParentTextFrames.Item(1).StartTextFrame.Tables.Item(1).Texts)
            Case "Cell"
            Set mySelection = mySelection.Parent.ConvertToText
            ConvertIt (mySelection.ParentTextFrames.Item(1))
            Case Else
            MsgBox "Invalid Selection"
            End Select
            End If


            I appreciate all the help!!!