Hello Regina,
I am using Java, 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.
Thanks,