public class WordProcessing
extends java.lang.Object
WordProcessing.createNewDocumentFromTemplate("SampleTemplate"); WordProcessing.typeTextAtBookmark("AddressLine1", "O'Reilly & Associated, Inc."); WordProcessing.typeTextAtBookmark("AddressLine2", "Mr Miller"); WordProcessing.typeTextAtBookmark("AddressLine3", "101 Moris Street"); WordProcessing.typeTextAtBookmark("AddressLine4", "Sebastopol, CA 95472-9902"); WordProcessing.typeTextAtBookmark("Salutation", "Dear Mr Miller,"); WordProcessing.exec();
InteractiveWordProcessing
,
BatchWordProcessing
Constructor and Description |
---|
WordProcessing() |
Modifier and Type | Method and Description |
---|---|
static void |
cancel()
Cancels the word processing.
|
static void |
changeDocumentDirectory(java.lang.String documentDirectory)
Sets the document directory for future document saving.
|
static void |
closeDocument()
Closes the active document.
|
static void |
createNewDocumentFromTemplate(java.lang.String templateName)
Creates a new document based on the desired template.
|
static void |
createNewDocumentFromTemplateToSelectByUser()
Triggers to the template selection dialog and creates a new document
based on the chosen template.
|
static boolean |
exec()
Starts the execution of the above instructions.
|
static void |
executeMacro(java.lang.String macroName)
Executes an arbitrary WordBasic macro.
|
static void |
printAndForget()
Prints the document on the standard printer and closes the document without saving.
|
static void |
printAndForget(java.lang.String printerName)
Prints the document on the specified printer and closes the document without saving.
|
static void |
printToPrinterToSelectByUserAndForget()
Triggers to the printer selection dialog, prints the document
on the selected printer and closes the document without saving.
|
static void |
quitApplication()
Quits the word processing application.
|
static void |
quitApplicationAfterWaiting(int milliseconds)
Quits the word processing application after a pause.
|
static void |
saveDocumentAs(java.lang.String documentName)
Saves the active document using the indicated name
(usually without extension).
|
static void |
saveDocumentAsAndClose(java.lang.String documentName)
Saves the active document using the indicated name and closes it.
|
static void |
setNoteNotMatchingBookmarks(boolean noteNotMatchingBookmarks)
Set the warning flag about not matching bookmarks
Decides whether the user shall be informed that the template didn't
include certain bookmarks.
|
static void |
typeTextAtBookmark(java.lang.String bookmark,
java.lang.String textToType)
Goes to the specified bookmark and types the desired text.
|
static void |
typeTextAtBookmark(java.lang.String bookmark,
java.lang.String[] linesToType)
Goes to the specified bookmark and types the desired text with line feed.
|
public static void createNewDocumentFromTemplateToSelectByUser()
public static void createNewDocumentFromTemplate(java.lang.String templateName)
templateName
- the name of the template to be usedpublic static void setNoteNotMatchingBookmarks(boolean noteNotMatchingBookmarks)
noteNotMatchingBookmarks
- whether the user should be warnedpublic static void typeTextAtBookmark(java.lang.String bookmark, java.lang.String textToType)
bookmark
- the bookmark where text type startstextToType
- the text to be includedpublic static void typeTextAtBookmark(java.lang.String bookmark, java.lang.String[] linesToType)
bookmark
- the bookmark where text type startslinesToType
- the lines to be includedpublic static void changeDocumentDirectory(java.lang.String documentDirectory)
documentDirectory
- the name of the directorypublic static void saveDocumentAs(java.lang.String documentName)
documentName
- the name of the documentpublic static void saveDocumentAsAndClose(java.lang.String documentName)
documentName
- the name of the documentpublic static void closeDocument()
public static void printAndForget()
public static void printAndForget(java.lang.String printerName)
printerName
- the name of the desired printerpublic static void printToPrinterToSelectByUserAndForget()
public static void executeMacro(java.lang.String macroName)
macroName
- the name of the macro to be executedpublic static void quitApplication()
public static void quitApplicationAfterWaiting(int milliseconds)
milliseconds
- waiting time in milliseconds prior leaving applicationpublic static boolean exec()
public static void cancel()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de