public Document getActiveDocument() { Document result = null; Variant activeDocument = OleUtils.INSTANCE.getProperty(getMyVariant().getAutomation(), "ActiveDocument"); if (activeDocument != null) { result = new Document(this, activeDocument); } return result; }
public void showDialog(int wdDialogConstants) { Variant dialogs = OleUtils.INSTANCE.getProperty(getMyVariant().getAutomation(), "Dialogs"); Variant dialog = OleUtils.INSTANCE.getElementInCollection(dialogs.getAutomation(), wdDialogConstants); OleUtils.INSTANCE.executeMethod(dialog.getAutomation(), "Show"); }