OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Insert string in .ods document from VB6 application.

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Pomp92
Newbie
Newbie


Joined: 18 May 2012
Posts: 2

PostPosted: Fri May 18, 2012 7:49 am    Post subject: Insert string in .ods document from VB6 application. Reply with quote

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 Wink

Thanks in advance!
Bye! Wink



Moderation probe1: moved to MACROS AND API section, where all macro related questions belong to
_________________
Pomp92
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Fri May 18, 2012 8:27 am    Post subject: Reply with quote

http://www.kalitech.fr/clients/doc/VB_APIOOo_en.html
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Pomp92
Newbie
Newbie


Joined: 18 May 2012
Posts: 2

PostPosted: Wed May 23, 2012 4:08 am    Post subject: Reply with quote

Thanks man. Wink 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? Sad
_________________
Pomp92
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group