You can vote for my RFE http://www.openoffice.org/issues/show_bug.cgi?id=68515 on this very subject.
> -----Original Message----- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurent Duperval > Sent: Saturday, October 14, 2006 8:52 PM > To: [email protected] > Subject: [users] Macros requiring input to dialog windows > > Hi, > > I recorded a macro to change font colors for two of my > styles. The idea is to allow me to create a handbook, and by > running the macro, make the answers appear or disappear. > > My problem is that when I run the macro, OO asks me to input > values in the dialog box. I expected that the values would be > input for me automatically. > > For example, when I recorded, I changed a font from Black to > White. When I run it, the dialog comes up, and OO waits for > me to provide the font color. > > Can I automate this completely? This is the sample code that > was recorded: > > sub HideAnswers > 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 > ---------------------------------------------------------------------- > dim args1(1) as new com.sun.star.beans.PropertyValue > args1(0).Name = "Param" > args1(0).Value = "Text body empty" > args1(1).Name = "Family" > args1(1).Value = 2 > > dispatcher.executeDispatch(document, ".uno:EditStyle", "", 0, args1()) > > rem > ---------------------------------------------------------------------- > dim args2(1) as new com.sun.star.beans.PropertyValue > args2(0).Name = "Param" > args2(0).Value = "Answer" > args2(1).Name = "Family" > args2(1).Value = 1 > > dispatcher.executeDispatch(document, ".uno:EditStyle", "", 0, args2()) > > > end sub > > Thanks! > > L > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] For > additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
