2 Replies Latest reply on Aug 23, 2009 6:50 PM by Olav Martin Kvern

    Setting a textframe border using VB.NET

    Guigy

      I am nearly finished a couple of small apps to build InDesign documents from some of our legacy data. Below is the code I am using to create and format my TextFrame, however I can't seem to get a border to go around the TextFrame.

       

      Any ideas .... my brain is hurting.

       

      TIA

       

       

       

                  myTextFrame = myDocument.TextFrames.Add

       

       

                  With myTextFrame
                      aryGeoBounds(0) = "0"
                      aryGeoBounds(1) = "0"
                      aryGeoBounds(2) = CStr(decDepth)
                      aryGeoBounds(3) = CStr(aryWidths(iColumn - 1))

       

                      aryInsetSpacing(0) = "0"
                      aryInsetSpacing(1) = CStr(My.Settings.textmargins) & " pt"
                      aryInsetSpacing(2) = "0"
                      aryInsetSpacing(3) = CStr(My.Settings.textmargins) & " pt"

       

                      .GeometricBounds = aryGeoBounds
                      .TextFramePreferences.InsetSpacing = aryInsetSpacing

       

                      .InsertionPoints.Item(-1).Place(GetFilename("txt"))

       

                      .Paragraphs.Item(1).Justification = idJustification.idCenterAlign
                      .Paragraphs.Item(1).Justification = idJustification.idCenterJustified
                      .TextFramePreferences.VerticalJustification = idVerticalJustification.idCenterAlign
                      .StrokeWeight = "10 pt"
                      .StrokeType = "Solid"
                  End With