Ask Your Question

Automation LibreOffice Calc 4.0 Examples for VB.NET [closed]

asked 2013-02-14 09:10:28 +0200

Handi Rusli gravatar image

updated 2020-08-05 23:49:11 +0200

Alex Kemp gravatar image

Hi All,

Anyone knows where I can get automation Calc 4.0 Examples for VB.NET ? Recently, I have been upgraded to Calc 4.0 but my code is no longer run. I was using Calc 3.6 previously and my code was running well.

Thanks in advance :-)

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-22 02:35:49.925283

2 Answers

Sort by » oldest newest most voted

answered 2013-02-18 03:15:14 +0200

Handi Rusli gravatar image

Hi @qubit,

Here is my code for detecting LibO is Installed or not :

Public Shared Function IsInstalled() As Boolean
    Dim balik As Boolean
    Dim xContext As
    Dim MSFactory As LibreOffice.lang.XMultiServiceFactory

        xContext = uno.util.Bootstrap.bootstrap()
        MSFactory = DirectCast(xContext.getServiceManager(), LibreOffice.lang.XMultiServiceFactory)
        balik = True
    Catch oERROR As Exception
        balik = False
    End Try

    Return balik
End Function

This function is always failed to detect LibO 4.0, but it's work perfectly in LibO 3.6

Am I missing something ?

Thanks :-)

edit flag offensive delete link more


Hi @Handi Rusli, I'm not that familiar with this aspect of macros in LO. I upvoted your question and tagged it appropriately, so hopefully we can get you someone with a bit more experience in this area :-)

qubit gravatar imagequbit ( 2013-02-18 03:44:09 +0200 )edit

Thank you very much, really appreciated :-)

Handi Rusli gravatar imageHandi Rusli ( 2013-02-18 04:39:55 +0200 )edit

answered 2013-02-15 08:52:06 +0200

qubit gravatar image

Hi @Handi Rusli,

Are you looking for examples of VB.NET code for LO 4.0?

If your code was running in 3.6, then in general it should require no more than minor tweaks to be able to run in 4.0. Could you share an example of what's no longer working for you or what's giving you an error?

edit flag offensive delete link more

Question Tools


Asked: 2013-02-14 09:10:28 +0200

Seen: 2,678 times

Last updated: Feb 18 '13