Hi,

I created a text frame. It has borders. I want to remove those borders. How can that be accomplished?

Jo

This is my attempt that doesn't work:

Sub InsertFooterFrame()
 Dim oCursor, oCursor2, oCursor3
 Dim oGraph
 Dim oText
 Dim oDoc

 Dim oFrameBorder As New com.sun.star.table.TableBorder
 Dim oLine As New com.sun.star.table.BorderLine

 CONST RED = 16711680
 CONST GREEN = 65280
 CONST BLUE = 255
 CONST WHITE = 16777215
 CONST BLACK = 0

 oDoc=ThisComponent
 oText = oDoc.getText()
 oCursor = oText.createTextCursor()
 oCursor.goToStart(FALSE)
 oFrame = oDoc.createInstance("com.sun.star.text.TextFrame")
'  oLine = oDoc.createInstance("com.sun.star.table.BorderLine")
'  oLine.OuterLineWidth = 250
'  oLine.InnerLineWidth = 0

 oFrameBorder =  oFrame.createInstance("com.sun.star.table.TableBorder")
 With oFrameBorder
   .OuterLineWidth = 250
 End With

 With oFrame
   .AnchorType = com.sun.star.text.TextContentAnchorType.AT_PAGE
   .HoriOrientPosition=5200
   .VertOrientPosition=24000
   .width = 13500
   .height = 18000
.HoriOrient = com.sun.star.text.HoriOrientation.NONE ' This is necessary to override the default settings for the positioning
   .VertOrient = com.sun.star.text.VertOrientation.NONE
   .BorderDistance = 0
'    .BottomBorder = oFrameBorder
 End With
'  oFrame.setPropertyValue('FrameIsAutomaticHeight', False)

 'insert the frame into the text document
 oText.insertTextContent( oCursor, oFrame, True )

 oCursor3=oFrame.createTextCursor()
 With oCursor3
   .String = ", some more black text"
   .CharColor = BLACK
   .ParaAdjust = 1 ' Right align
 End With

 oCursor2=oFrame.createTextCursor()
 With oCursor2
   .String = "some red text"
   .CharColor = RED
   .ParaAdjust = 1 ' Right align
End With
 Xray oFrame

oFrame.dispose() ' for testing it's nice to remove the frame for the next round
End Sub

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to