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

Macro to Open Form in Base

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
bhartung
General User
General User


Joined: 05 Jul 2007
Posts: 19
Location: Oregon, WI - USA

PostPosted: Thu Jul 29, 2010 5:46 am    Post subject: Macro to Open Form in Base Reply with quote

I'm trying to develop a macro in Base but I'm not having any success.

I've been using Open Office for some time and have worked with macros in Calc quite a bit. Now I want to develop a Base macro to open a form, maximize the window, open data-source as a table and sort by the first column.

I tried using the macro recorder to do this and everything appears to be recording fine and when I save the macro and then review it, apparently nothing has been generated accept the macro header...

Quote:

sub Main
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:ViewFormAsGrid", "", 0, Array())


end sub


Seems odd that the last and only line that would seem to do something is remarked by the recorder.

I've tried to search for programming examples for Base and what I'm trying to do but haven't had much luck.

I'm running OO v3.2.1.
_________________
Bob Hartung
Back to top
View user's profile Send private message Visit poster's website
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Thu Jul 29, 2010 6:47 am    Post subject: Reply with quote

Hello

Use the basetools of Benitez.

Romke
Back to top
View user's profile Send private message
bhartung
General User
General User


Joined: 05 Jul 2007
Posts: 19
Location: Oregon, WI - USA

PostPosted: Thu Jul 29, 2010 8:59 am    Post subject: Reply with quote

Thanks. Those look helpful.

So the macro capabilities that are included with OO are not functional in Base?
_________________
Bob Hartung
Back to top
View user's profile Send private message Visit poster's website
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Thu Jul 29, 2010 11:53 am    Post subject: Reply with quote

Hello

Recorded macro's work not so good in OOobase.

Romke
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 Base 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