| View previous topic :: View next topic |
| Author |
Message |
TommyR General User

Joined: 29 Sep 2005 Posts: 7
|
Posted: Tue Oct 04, 2005 1:07 am Post subject: Using old VBE Code in IDE of OpenOffice? |
|
|
Hi,
well I am a new user of the OpenOffice application and also new here, too
I read so much new and interesting articles, but I don't find any information about my situation now. I hope I don't ask a looping question
Well, I used MS Office before and now I like to rechange my code into the OpenOffice code language, but I saw there are a lot of differences between this and those application.
B.t.w. I prefer the Java object modell from OpenOffice cause it's easy to understand if you are a Java-Developer - but now my question...I hope anybody can help me...
Well is it possible to use the IDE as an object? *sorry if I couldn't find the answer*
For example on VB you can write this:
mOfficeApplication.VBE.VBProjects.Count .... --> to get the number of current VBProjects open in then Microsoft Application
My target would be to write from an external programm OpenOffice Basic code (dynamic) into the current open OpenOffice document
Can anybody help me? |
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
|
| Back to top |
|
 |
TommyR General User

Joined: 29 Sep 2005 Posts: 7
|
Posted: Wed Oct 05, 2005 12:03 am Post subject: |
|
|
Thanks for U'r help
But I search for a solution to get the Object which represents the IDE.
Well my prefer way should be this: I write dynamic code (OpenOffice macro) in my application, then I try to make a connection to an OpenOffice application(Desktop-Object ) open a document ( write or calc ) and then I push the dynamic macro into the the documents backend to run this macro if I need.
The important thing is, that the code what I want to push to the OpenOffice document could be soooo diferent, that I am not able to write this macro as default into the document.
I hope I describe it in an understandable way ... well sorry if not -  |
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2465 Location: Chonburi Thailand Asia
|
Posted: Wed Oct 05, 2005 3:15 am Post subject: |
|
|
If you would like to append a [module/text] to a document, the macro mentioned above is a good starting point - you don't need an "IDE object".
Macros attached to a document could be reached by through API without an IDE object needed. _________________ Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs |
|
| Back to top |
|
 |
TommyR General User

Joined: 29 Sep 2005 Posts: 7
|
Posted: Wed Oct 05, 2005 3:27 am Post subject: |
|
|
Right! To append a text or module, the code is really a good starting point.
But my problem is to get the code or macro into the documents IDE - before I want to run the code.
Do you still have an example how I attach the macro to my document? Cause first I will have an empty document and during my runtime I want to attach the macro.  |
|
| Back to top |
|
 |
|