Hello Regina, Everything works now, thanks a lot for your help.
This is the final code in case anyone has the same problem: PropertyValue[] args = new PropertyValue[0]; XDispatchProvider xTempDispatchProvider = unoQuery(XDispatchProvider.class, xTempNewDocumentController.getFrame()); getXDispatchHelper().executeDispatch(xTempDispatchProvider, ".uno:ClosePreview", "", 0, args); Thanks, Best Regards, Tengiz Merabishvili FINA Ltd | ORACLE Gold Partner On Fri, Dec 18, 2015 at 3:20 PM, Regina Henschel <[email protected]> wrote: > Hi Tengiz, > > Tengiz Merabishvili schrieb: > >> Hello Regina, >> >> I am using Java, >> > > then someone else should help you. Perhaps you can ask in the forum? Using > the dispatcher is nothing special. > > Or have you already searched for dispatcher in the developer guide? Most > examples are in Java there. > > trying it like that: > >> PropertyValue[] args = new PropertyValue[3]; >> >> args[0] = new PropertyValue(); >> args[0].Name = "DocName"; >> args[0].Value = >> getTitlePropertyValue(getXDesktop().getCurrentComponent()); >> args[1] = new PropertyValue(); >> args[1].Name = "Index"; >> args[1].Value = 1; >> args[2] = new PropertyValue(); >> args[2].Name = "Copy"; >> args[2].Value = true; >> >> XDispatchProvider xTempDispatchProvider = >> unoQuery(XDispatchProvider.class, xTempNewDocumentController.getFrame()); >> >> getXDispatchHelper().executeDispatch(xTempDispatchProvider, >> ".uno:ClosePreview", "", 0, args); >> >> But the executeDispatch call doesn't seem to be working correctly. >> > > In Basic "args" is an empty array in case of ".uno:ClosePreview". > > > Kind regards > Regina > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
