| View previous topic :: View next topic |
| Author |
Message |
Pomp92 Newbie

Joined: 18 May 2012 Posts: 2
|
Posted: Fri May 18, 2012 7:49 am Post subject: Insert string in .ods document from VB6 application. |
|
|
Hi guy's.
I am having some problems with this operation.
I fixed a few points but it's easyer if I ask you first if you have a working example of what I need.
From a VB6 application I want to:
-open a existing .ods document
-insert values (strings) in some cells
-run a macro that is stored in the document
-close all connections with the document and let it doing it's own work
Thanks in advance!
Bye!
Moderation probe1: moved to MACROS AND API section, where all macro related questions belong to _________________ Pomp92 |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
|
| Back to top |
|
 |
Pomp92 Newbie

Joined: 18 May 2012 Posts: 2
|
Posted: Wed May 23, 2012 4:08 am Post subject: |
|
|
Thanks man. Now I'll check if there's something usefull for me.
Edit: I've done the first two points but i'm locked here:
-run a macro that is stored in the document
the macro is called "CreateReport" and the ods document is "CreaModCfg.ods". "Foglio1" is the name of the sheet.
| Code: | Dim oDispatch As Object
oDispatch = oServiceManager.createInstance("com.sun.star.frame.DispatchHelper")
Call oDispatch.executeDispatch(oDesktop, "macro://CreaModCfg/Standard.Foglio1.CreateReport()", "", 0, Array())
|
oServiceManager exists and works correctly beacuse I se it also in previous istructions.
When i run it i get an error on the second line.
| Code: | | Error description: Object variable or With block variable not set |
Ideas?  _________________ Pomp92 |
|
| Back to top |
|
 |
|