Complete newbie question, using OO with VB6

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
akaTwoSheds
Posts: 2
Joined: Fri Aug 29, 2008 4:11 pm

Complete newbie question, using OO with VB6

Post by akaTwoSheds »

Yes, VB6, the programming equivalent of communicating in grunts and shrieks - go ahead make your jokes now, I'll wait <g>.

It's a large system that we can't devote time to reworking at this time no matter how much I'd like to. The software in question is run off of USB flash drives which our sales guys tote around from client to client. One of the big requests that they have is the ability to generate spreadsheets with predefined charts from the data which they collect on site.

Here's where it gets tricky. They want to be able to do this on the fly at the clients location, and we can't assume that every PC they use will have MS Excel installed on it. I've toyed with the idea of including the Excel run times on the USB drive but the copyright ice there seems pretty thin so I haven't pursued it. Then today in a flash of desperation brilliance I thought of OO.

The first question is a technical one. Is it possible to use the Calc internals with VB6 without actually installing OO / Calc on the computer in question? We can register controls/DLLs if necessary, but installing an entire desktop package would be pushing our luck.

Second, and assuming that the answer to number one is a resounding "oh heck yes", before I take this idea to the big cheese, am I treading on shakey IP ground with it?

Finally, assuming that it's all yes's so far, are there any web sites, forums, or chiseled clay tablets passed from father to son through the generations that deal with integrating OO with the very ancient VB6?

Thanks a ton for any help or guidance...
OOo 2.3.X on Ms Windows XP
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Complete newbie question, using OO with VB6

Post by acknak »

[Moved to Macros and UNO API]

So you're saying that you have an application written in VB6 that, what, links into Excel to create charts? I'm not clear how Excel and your VB6 code are linked.

I don't know enough about Windows programming to guess what the answer is, I just thought if it's not clear to me, maybe it's not clear to someone else.

I do know that there is a "portable" version of OOo that runs from a memory stick, so that shouldn't be an issue as long as the technical side will work. As long as you're not modifying OOo, you can copy and use it as much as you need.
AOO4/LO5 • Linux • Fedora 23
User avatar
squenson
Volunteer
Posts: 1885
Joined: Wed Jan 30, 2008 9:21 pm
Location: Lausanne, Switzerland

Re: Complete newbie question, using OO with VB6

Post by squenson »

A bunch of interesting questions...

OOo exposes its model through APIs located in DLLs, so theoretically, you should be able to pilot OOo from VB6. Unfortunately the object model of OOo is completely different from Excel model, so most of your code will have to be rewritten. As far as IP is concerned, I see no issue to develop some code, compile it and run it on several computers, I think that the VB6 license allows that.

There is a version of OOo that runs from a USB key (do a search in this forum with the keywords "USB" "OOo"), so it may help to have everything running from a USB key.

Concerning VB6 and OOo integration, I am not aware of any resource talking about it.

I would look into another direction: a virtual machine that can run on any computer with windows, containing Office and your program. Have a look at VirtualBox, if it runs from a USB key it may be the solution.
LibreOffice 4.2.3.3. on Ubuntu 14.04
akaTwoSheds
Posts: 2
Joined: Fri Aug 29, 2008 4:11 pm

Re: Complete newbie question, using OO with VB6

Post by akaTwoSheds »

First off your profile pic is my favorite cartoon of all time <G>.

This is all speculative, to date we've been telling them that it can't possibly be done because of licensing restrictions, so I'm sort of making this up as I go, but it's possible to use the installed libraries for Excel or any of the MSO programs directly from within VB by including a reference to them. As long as they're properly installed on the system everything should be fine.

That said I don't know for a fact that it's possible to simply take the pertinent Excel libraries and try registering them without MSO and then make the whole thing work. It seems like the various parts of the normal installation procedure which deal wil the license and key code should object to such a thing <g>
OOo 2.3.X on Ms Windows XP
User avatar
squenson
Volunteer
Posts: 1885
Joined: Wed Jan 30, 2008 9:21 pm
Location: Lausanne, Switzerland

Re: Complete newbie question, using OO with VB6

Post by squenson »

I am not an expert of Excel licensing, but I guess that if you want to use some of the features of this software, you need to have a license. Some Microsoft products allow free run-time, like Access and .mde files, but I guess that Excel is not in this category.
LibreOffice 4.2.3.3. on Ubuntu 14.04
Post Reply