INTELLIGENT WORK FORUMS FOR COMPUTER PROFESSIONALS
Come Join Us!
Are you a Computer / IT professional? Join Tek-Tips now!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
Favorite Forums
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site

(Download This Button Today!)
Feedback
"...A lot of the information I've found at this site would've taken me forever if I'd have attempted to research it on my own. Thanks again."
Geography
Where in the world do Tek-Tips members come from?
|
|
|
tranpkp (TechnicalUser) |
15 Apr 11 11:32 |
I know without some pretty involved doing in Excel but curious if object model of OpenOffice supports? Can you dynamically create code in openoffice? For example: can you have a script that will create a NEW openoffice calc spreadsheet and then subsequently have code saved in it? Such as and OpenBook event where nextime someone opened it some other code would run? Tranpkp ![[pc2] pc2](http://www.tipmaster.com/images/pc2.gif)
|
|
|
kjv1611 (TechnicalUser) |
6 May 11 13:45 |
Take a look at LibreOffice. It's the way to go, going forward, for open source office suites. It's a branch off of OpenOffice, and most of its staff and such are those who were the main contributors to OpenOffice, best I recall. Anyway, download it, install it, and take a look at the scripting menu, I think it is... or another, I forget the specific one. I'm at work right now, so I don't have access to LibreOffice, only MS Office. I noticed recently (in clicking around) that LibreOffice supports VBA (MS Office programming), php, and a few others, I forget the specifics right now, but I know I want to find the time to play around in it a little bit. |
|
|
kjv1611 (TechnicalUser) |
6 May 11 13:47 |
Oh, by the way, I'm not sure how far that "support" for VBA goes, so don't quote me on that. ![[wink] wink](http://www.tipmaster.com/images/wink.gif) After all, I'd doubt that Microsoft would allow a competitor to directly license the VBA object models. |
|
|
Bong (Programmer) |
9 May 11 10:44 |
In my experience, VBA macros do not run in OO or LO for the most part. To access the document/spreadsheet object model, you need to reference some API (whose name I can't recall). _________________ Bob Rashkin |
|
|
tranpkp (TechnicalUser) |
9 May 11 10:50 |
I'm sorry I dont think you all our understanding the question. My question is I am well away of the opensource forking of OO to LO which doesnt remotely have anything to do w/ my question. Both offer some sort of VBA support but otherwise have their own object models. What my question is: Can you DYNAMICALLY create code in LibreOffice? For example can you programatically generate a brand new file, and embed code in that file? Such as create brand new stinking.xls embed code in there such as Openbook event module that would "hello world" when opening that file? IE basically self generating code that would be local to the file itself. This was not possible in Excel without some craziness which would not be feasible. Tranpkp ![[pc2] pc2](http://www.tipmaster.com/images/pc2.gif)
|
|
|
kjv1611 (TechnicalUser) |
10 May 11 11:01 |
I think you're not understanding your own question, quite frankly. Here's you're question: Quote:I know without some pretty involved doing in Excel but curious if object model of OpenOffice supports? Can you dynamically create code in openoffice?
For example: can you have a script that will create a NEW openoffice calc spreadsheet and then subsequently have code saved in it? Such as and OpenBook event where nextime someone opened it some other code would run?
The reason I mentioned LibreOffice is that it is highly possible you did not know about it. Since it's a new product, it's possible you would be referring to it rather than OpenOffice. Whichever you want to go with, however, I'd suggest you specify that one. So for the remainder of this thread, I'll just assume OpenOffice. Now to break down the details: ==>I know without some pretty involved doing in Excel but curious if object model of OpenOffice supports?1. That question is so grammatically incorrect, I can't begin to ensure I understand it. My guess is you're asking 1 of 2 things: 1. Does OpenOffice support the MS Office Object Model? or.. 2. Does OpenOffice have it's own built-in Object Model? ==>Can you dynamically create code in openoffice?Make sure you understand the definition of dynamic code, and that you understand what you're asking here. If you think you understand what you're asking, please clarify. One possible reference==> For example: can you have a script that will create a NEW openoffice calc spreadsheet and then subsequently have code saved in it? Such as and OpenBook event where nextime someone opened it some other code would run? So, are you wanting to just click a button, and the program create it's own programmed scripting automatically? Or are you talking more-so about setting up the scripting the same/similar way you would do in Excel? In Excel, for instance, you would create the workbook (as of MS Office 2007, specifically an .xlsb workbook - macro enabled), put whatever code in it where you want, according to your need/desire, save it... then when opened (if in the workbook_open event), it would execute. Or if you wnated it to be a template, of course, you'd save that as a macro-enabled template. Is that what you're after? Where YOU set up the code, or are you looking for it to record the code like the macro recording tool in MS Office? In OpenOffice, to record a macro: http://wiki.services.openoffice.org/wiki/Documentation/FAQ/Macros/How_can_I_record_a_macro%3FFor the On Open event, here's one reference I found: http://user.services.openoffice.org/en/forum/viewtopic.php?f=20&t=26902Otherwise, you need to clarify your question. |
|
|
tranpkp (TechnicalUser) |
10 May 11 11:09 |
==> YES! It is clear. Any of these such examples would suffice. Like I said dynamically generated code, where a script genereated code that is embedded and saved locally within a workbook. For example: can you have a script that will create a NEW openoffice calc spreadsheet and then subsequently have code saved in it? Such as and OpenBook event where nextime someone opened it some other code would run? So, are you wanting to just click a button, and the program create it's own programmed scripting automatically? Or are you talking more-so about setting up the scripting the same/similar way you would do in Excel? In Excel, for instance, you would create the workbook (as of MS Office 2007, specifically an .xlsb workbook - macro enabled), put whatever code in it where you want, according to your need/desire, save it... then when opened (if in the workbook_open event), it would execute. Or if you wnated it to be a template, of course, you'd save that as a macro-enabled template. Tranpkp ![[pc2] pc2](http://www.tipmaster.com/images/pc2.gif)
|
|
|
kjv1611 (TechnicalUser) |
10 May 11 15:31 |
How far have you dug into it yourself? You seem to be asking is scripting events possible in OpenOffice? Isn't that about like asking Can a Duck float on water?
I don't know, maybe I'm just missing something. If I am, I'm sure someone will come along with a better answer. But I still think you've just not tried. If you're really interested, the software is free, easy to install and setup. I'm assuming you've tried at least something in OpenOffice.
Otherwise, if I get a chance away from work in the near future (as I don't have it at work), I might try to look at both OpenOffice and LibreOffice on the scripting options. It's soemthing I've been wanting to do anyway... just not enough time. |
|
|
 |
|