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

Joined: 05 Jul 2007 Posts: 19 Location: Oregon, WI - USA
|
Posted: Thu Jul 29, 2010 5:46 am Post subject: Macro to Open Form in Base |
|
|
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 |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
|
| Back to top |
|
 |
bhartung General User

Joined: 05 Jul 2007 Posts: 19 Location: Oregon, WI - USA
|
Posted: Thu Jul 29, 2010 8:59 am Post subject: |
|
|
Thanks. Those look helpful.
So the macro capabilities that are included with OO are not functional in Base? _________________ Bob Hartung |
|
| Back to top |
|
 |
RPG Super User

Joined: 24 Apr 2008 Posts: 2696 Location: Apeldoorn, Netherland
|
Posted: Thu Jul 29, 2010 11:53 am Post subject: |
|
|
Hello
Recorded macro's work not so good in OOobase.
Romke |
|
| Back to top |
|
 |
|