예제 #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;
 }
예제 #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");
 }