Kent Gibson wrote:
if I remember correctly all you have to do is comment
out

 oLine =
oDoc.createInstance("com.sun.star.table.BorderLine")

that way you pass a default borderline which should be
invisible.

otherwise you can also use a framestyle which defaults
to invisible.
Hi Kent,

I seem to have found a solution that does what I want:

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
 CONST GREY = 128 + 256 * 128 + 65536 * 128

 oDoc=ThisComponent
 oText = oDoc.getText()
 oCursor = oText.createTextCursor()
 oCursor.goToStart(FALSE)
 oFrame = oDoc.createInstance("com.sun.star.text.TextFrame")

 Dim v 'represents the FrameBorder Object as a whole
With oFrame
   .AnchorType = com.sun.star.text.TextContentAnchorType.AT_PAGE
   .HoriOrientPosition=8000 ' 5200
   .VertOrientPosition=24500
   .width = 10000 ' 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
 End With

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

 v = oFrame.TopBorder
 v.OuterLineWidth = 0 : v.InnerLineWidth = 0 : v.LineDistance = 0
 oFrame.TopBorder = v

 v = oFrame.BottomBorder
 v.OuterLineWidth = 0 : v.InnerLineWidth = 0 : v.LineDistance = 0
 oFrame.BottomBorder = v

 v = oFrame.LeftBorder
 v.OuterLineWidth = 0 : v.InnerLineWidth = 0 : v.LineDistance = 0
 oFrame.LeftBorder = v

 v = oFrame.RightBorder
v.OuterLineWidth = 110 : v.InnerLineWidth = 0 : v.LineDistance = 140 : v.Color = GREY
 oFrame.RightBorder = v

oCursor3=oFrame.createTextCursor() ' For some reason this needs to be defined first and then it goes after the other one
 With oCursor3
   .String = ", Another string"  + CHR$(10)
   .CharColor = BLACK
   .ParaAdjust = 1 ' Right align
   .CharHeight = 8
 End With

 oCursor2=oFrame.createTextCursor()
 With oCursor2
   .String = "some red string"
   .CharColor = RED
   .ParaAdjust = 1 ' Right align
   .CharHeight = 8
End With End Sub

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

Reply via email to