Help regarding OpenOffice and VB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samdotnetprogrammer
    New Member
    • Oct 2007
    • 4

    Help regarding OpenOffice and VB

    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
    Last edited by Dököll; Nov 29 '07, 03:04 AM. Reason: Code tags
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by samdotnetprogra mmer
    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
    Last edited by Killer42; Nov 29 '07, 04:18 AM.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Which line throws the error?

      Comment

      • VbHulk
        New Member
        • Dec 2007
        • 3

        #4
        Hi All,

        I am experiencing similar issues as faced by samdotnetprogra mmer. 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.



        Originally posted by samdotnetprogra mmer
        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

        Comment

        • VbHulk
          New Member
          • Dec 2007
          • 3

          #5
          Hi All,

          I am experiencing similar issues as faced by samdotnetprogra mmer. 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

          Originally posted by samdotnetprogra mmer
          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

          Comment

          • VbHulk
            New Member
            • Dec 2007
            • 3

            #6
            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
            Last edited by Killer42; Dec 18 '07, 09:30 PM.

            Comment

            • lotus18
              Contributor
              • Nov 2007
              • 865

              #7
              Good job vbhulk

              This is gonna be helpful to anyone with same problem like this.

              Comment

              Working...