Opens Microsoft WORD.
A document can be specified in Parm1.
Syntax
CHGVAR |
VAR(&CMD) VALUE('WORDOPEN') |
CHGVAR |
VAR(&PARM1) VALUE('File name') |
CHGVAR |
VAR(&PARM2) VALUE(' [Directory="Directory path";] [Document="File name";] [Detach = True/False;] [Visible;] [ReadOnly;] [New;] [Minimize;] [Maximize;] [DOCPWD="Password for opening";] [WRTPWD="Password for modification";] ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 |
Name of the file to open. It may be empty if a new document has to be created, or includes a template name, if NEW is specified as parameter 2.
|
Parm2
RESULT |
This directory path is added in front of the path and the file name given in parameter 1. Document If the requested document is already open, it is made active, it becomes the current document for Word. No new file is opened, so the name of the file or template is ignored.
Detach =
True/False When a document is opened and attached to a data source (Merge File), it is maintained by Word, and therefore not editable. You must detach the data source from the current document if you want to send new data to the merge file.
VISIBLE =to show Word.
MINIMIZE= window is reduced.
MAXIMIZE= window is widened.
READONLY = open for reading only. Default value is False
NEW = allows to create a new document if Parm1 is empty.
DOCPWD = opening password. Uppercase/lowercase must be respected if the document is password protected.
WRTPWD= modification password. Must be filled if the document is modification protected.
NOTICE !!! Word must be shown to open a password protected document.
Name of the document When returning the WDOCUMENT command, the &RESULT parameter contains the name of the active document. For a document opened from a file, the name of the document is equal to the name of the file, without the path and without the suffix ".DOCX". If the document has just been created, its name was built by Word.
|
Example
LNCCMD CMD(WORDOPEN) PARM1('C:\A\Templates\sp_cust.docx')
See also