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

Joined: 19 May 2008 Posts: 18
|
Posted: Tue Sep 02, 2008 1:48 pm Post subject: Howto Auto-skip Dialog Boxes in Macros? |
|
|
Peace!
I usually make macros through the "Record macro" function. However, I cannot find a way to automatically select a particular answer as the default for a particular dialog box.
Case in point, a macro involving the "Merge cells" function. OO will keep asking me the following question.
"Should the contents of the hidden cells be moved to the first cell?"
Is there a way to set the answer to the above as "No" each time the macro is run?
Thanks in advance! |
|
| Back to top |
|
 |
emallove General User


Joined: 01 Oct 2008 Posts: 5 Location: Burlington, MA
|
Posted: Wed Oct 01, 2008 8:37 am Post subject: Re: Howto Auto-skip Dialog Boxes in Macros? |
|
|
A month passes and no response? Herein lies the problem with giving thanks in advance
I have the same question, and have found a few things. It looks like OpenOffice macros might have a limitation with regards to dialog boxes. The below wiki page states .. If a dialog is opened, the command to open the dialog is likely to be generated. Any work done inside the dialog is not likely to be recorded..
http://wiki.services.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Getting_Started/Sometimes_the_macro_recorder_fails
The recorded BASIC macro code for the ToggleMergeCells is below:
| Code: | rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "MoveContents"
args3(0).Value = true
dispatcher.executeDispatch(document, ".uno:ToggleMergeCells", "", 0, args3()) |
So are there arguments that can be passed to executeDispatch to invoke the "Yes" button click that we are looking for? I've yet to find an answer in all the OOo docs, forums, wikis, etc. |
|
| Back to top |
|
 |
|
|
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
|