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

Howto Auto-skip Dialog Boxes in Macros?

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


Joined: 19 May 2008
Posts: 18

PostPosted: Tue Sep 02, 2008 1:48 pm    Post subject: Howto Auto-skip Dialog Boxes in Macros? Reply with quote

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
View user's profile Send private message
emallove
General User
General User


Joined: 01 Oct 2008
Posts: 5
Location: Burlington, MA

PostPosted: Wed Oct 01, 2008 8:37 am    Post subject: Re: Howto Auto-skip Dialog Boxes in Macros? Reply with quote

A month passes and no response? Herein lies the problem with giving thanks in advance Wink

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc 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