Esempio n. 1
0
 public Document getActiveDocument() {
   Document result = null;
   Variant activeDocument =
       OleUtils.INSTANCE.getProperty(getMyVariant().getAutomation(), "ActiveDocument");
   if (activeDocument != null) {
     result = new Document(this, activeDocument);
   }
   return result;
 }
Esempio n. 2
0
 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");
 }