By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,057 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,057 IT Pros & Developers. It's quick & easy.

Help regarding OpenOffice and VB

P: 4
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 :

Expand|Select|Wrap|Line Numbers
  1. Function MakeCellBorderLine(nColor, nInnerLineWidth, nOuterLineWidth, nLineDistance) As Object
  2.     oBorderLine = createUnoStruct("com.sun.star.table.BorderLine")
  3.     With oBorderLine
  4.         .Color = nColor
  5.         .innerlinewidth = nInnerLineWidth
  6.         .outerlinewidth = nOuterLineWidth
  7.         .linedistance = nLineDistance
  8.     End With
  9.  
  10.     MakeCellBorderLine = oBorderLine
  11. End Function
  12.  
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
Nov 28 '07 #1
Share this Question
Share on Google+
6 Replies


Dököll
Expert 100+
P: 2,364
I am trying to code using Visual Basic to open OpenOffice calc application and manipulate with the cells ...
Please forgive me, I do not know how this can be handled. Have you searched here previously?

Good luck!

Dököll
Nov 29 '07 #2

Expert 5K+
P: 8,434
Which line throws the error?
Nov 29 '07 #3

P: 3
Hi All,

I am experiencing similar issues as faced by samdotnetprogrammer. Please could anyone tell the .dll that we need to use so that we could work on OpenOffice Excel / Word. Few hours back I saw a website that mentions the following dll:

1. OOWRITVB.DLL - For Text Docs. (OpenOffice)
2. OOCALCVB.DLL - For Excel. (OpenOffice)

I presume that once we add these two files in the references, we will be able to work just as we can work on Microsoft Excel after adding Microsoft Excel 11.0 Object Library.

Am I right? Please let me know.



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 :

Expand|Select|Wrap|Line Numbers
  1. Function MakeCellBorderLine(nColor, nInnerLineWidth, nOuterLineWidth, nLineDistance) As Object
  2.     oBorderLine = createUnoStruct("com.sun.star.table.BorderLine")
  3.     With oBorderLine
  4.         .Color = nColor
  5.         .innerlinewidth = nInnerLineWidth
  6.         .outerlinewidth = nOuterLineWidth
  7.         .linedistance = nLineDistance
  8.     End With
  9.  
  10.     MakeCellBorderLine = oBorderLine
  11. End Function
  12.  
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
Dec 18 '07 #4

P: 3
Hi All,

I am experiencing similar issues as faced by samdotnetprogrammer. Please could anyone tell the .dll that we need to use so that we could work on OpenOffice Excel / Word. Few hours back I saw a website that mentions the following dll:

1. OOWRITVB.DLL - For Text Docs. (OpenOffice)
2. OOCALCVB.DLL - For Excel. (OpenOffice)

I presume that once we add these two files in the references, we will be able to work just as we can work on Microsoft Excel after adding Microsoft Excel 11.0 Object Library.

Am I right? Please let me know.

Regards,
VBHulk

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 :

Expand|Select|Wrap|Line Numbers
  1. Function MakeCellBorderLine(nColor, nInnerLineWidth, nOuterLineWidth, nLineDistance) As Object
  2.     oBorderLine = createUnoStruct("com.sun.star.table.BorderLine")
  3.     With oBorderLine
  4.         .Color = nColor
  5.         .innerlinewidth = nInnerLineWidth
  6.         .outerlinewidth = nOuterLineWidth
  7.         .linedistance = nLineDistance
  8.     End With
  9.  
  10.     MakeCellBorderLine = oBorderLine
  11. End Function
  12.  
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
Dec 18 '07 #5

P: 3
Hi ALL,

I finally got what I needed. The following DLLs can be downloaded from the URL given below:

a. OOWRITVB.DLL
b. OOCALCVB.DLL

URL: http://pagesperso-orange.fr/hffm/m3.html

You can see version 1.00 written against the DLL names on the website:- OOWRITVB AND OOCALCVB. Download the zips. After extracting the zips, a folder named TEST would also be copied. Open this folder and you can see these DLLs. I would like to thank Amrut Koli, a senior engineer who assisted me in finding the DLLs.

Regards,
Thomas
Dec 18 '07 #6

lotus18
100+
P: 866
Good job vbhulk

This is gonna be helpful to anyone with same problem like this.
Dec 18 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.