Hello All,
I am trying to code using Visual Basic to open OpenOffice calc application and manipulate with the cells. I am successful to a certain extent, however I am facing a problem formatting the cell..... for example, I want to draw borders to a cell. How can this be achieved??
Following is the code that I have written :
[CODE=VB]
Function MakeCellBorderL ine(nColor, nInnerLineWidth , nOuterLineWidth , nLineDistance) As Object
oBorderLine = createUnoStruct ("com.sun.star. table.BorderLin e")
With oBorderLine
.Color = nColor
.innerlinewidth = nInnerLineWidth
.outerlinewidth = nOuterLineWidth
.linedistance = nLineDistance
End With
MakeCellBorderL ine = oBorderLine
End Function
[/CODE]
Whenever I compile my code it gives me an error that says : "User-defined type not defined". I have absolutely NO CLUE how to proceed. Can someone be of help???
Thanks a ton in advance..
Rgds,
SAM
I am trying to code using Visual Basic to open OpenOffice calc application and manipulate with the cells. I am successful to a certain extent, however I am facing a problem formatting the cell..... for example, I want to draw borders to a cell. How can this be achieved??
Following is the code that I have written :
[CODE=VB]
Function MakeCellBorderL ine(nColor, nInnerLineWidth , nOuterLineWidth , nLineDistance) As Object
oBorderLine = createUnoStruct ("com.sun.star. table.BorderLin e")
With oBorderLine
.Color = nColor
.innerlinewidth = nInnerLineWidth
.outerlinewidth = nOuterLineWidth
.linedistance = nLineDistance
End With
MakeCellBorderL ine = oBorderLine
End Function
[/CODE]
Whenever I compile my code it gives me an error that says : "User-defined type not defined". I have absolutely NO CLUE how to proceed. Can someone be of help???
Thanks a ton in advance..
Rgds,
SAM
Comment