Products Downloads


French version


 

Activates the DocumentName document in the Microsoft Word application.

The ReturnCode parameter can be used to show whether or not the method has been run successfully.

Syntax

CALL_METHOD NameWordClientObject DOC_ACTIVATE DocumentName ReturnCode

Parameters

DocumentName

ALPHA(50) type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

Note: If another document is activated, the current range will no longer be valid. Therefore, you may need to set a new range.

 

Creates a new document in the Microsoft Word application, using a model if one is specified by the parameter FileNamePath.

The ReturnCode parameter will be set to "0" if the method is called successfully, or to a value other than "0" if this is not the case.

Syntax

CALL_METHOD NameWordClientObject DOC_ADD FileNamePath ReturnCode

Parameters

FileNamePath

ALPHA(260) type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Closes the active Microsoft Word document, possibly saving any changes, depending on the value of the SaveChanges parameter.

The ReturnCode parameter will be set to "0" if the method is called successfully, or to a value other than "0" if this is not the case.

Syntax

CALL_METHOD NameWordClientObject DOC_CLOSE SaveChanges ReturnCode

Parameters

SaveChanges

BOOL type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Retrieves a document into a Visual Adelia application variable, taking the following parameters into account:

DocumentName

name of the document to be retrieved,

Cible

variable into which the document is to be retrieved.

 

The ReturnCode parameter will be set to "0" if the method is called successfully, or to a value other than "0" if this is not the case.

 

Syntax

CALL_METHOD NameWordClientObject DOC_GET DocumentName Target ReturnCode

Parameters

DocumentName

ALPHA(50) type (input parameter)

Target

IMAGE type (output parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Retrieves the value of an option defined in the current document.

Option

option, the value of which is to be retrieved.

Value

value of the option.

 

 

Syntax

ALL_METHOD NameWordClientObject DOC_GET_OPTION Option Value ReturnCode

Parameters

Option

NUM_BIN_4 type (input parameter)

Possible values:

_WRD_SHOW_SPELLING_ERRORS

BOOL

Indicates if Word underlines spelling errors in the document.

_WRD_SHOW_GRAMMATICAL_ERRORS

BOOL

Indicates if Word underlines grammatical errors in the document.

Value

The type depends on the option (output parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

Possible values:

_WRD_ERR_OK

Method run successfully.

_WRD_ERR_EXEC

Method failed.

_WRD_ERR_TYPE

Value does not have the right Adelia type.

_WRD_ERR_PARAM

Option has an incorrect value.

 

 

Example >>

 

Positions the current range to the start of the specified element and collapses it, taking the following parameters into account:

Type

type of the element to which the range is to be moved,

MovementType

type of movement to be performed,

Number

number (always positive) of the element in the document,

Name

element name, in the case of bookmarks, notes and fields.

 

The ReturnCode parameter will be set to "0" if the method is called successfully, or to a value other than "0" if this is not the case.

 

Syntax

CALL_METHOD NameWordClientObject DOC_GO_TO Type MovementType Number Name ReturnCode

Parameters

Type

NUM_BIN_4 type (input parameter)

Possible values:

_WRD_GO_TO_BOOKMARK

the range will be moved to a bookmark,

_WRD_GO_TO_COMMENT

the range will be moved to a comment,

_WRD_GO_TO_ENDNOTE

the range will be moved to an endnote,

_WRD_GO_TO_EQUATION

the range will be moved to an equation,

_WRD_GO_TO_FIELD

the range will be moved to a field,

_WRD_GO_TO_FOOTNOTE

the range will be moved to a footnote,

_WRD_GO_TO_GRAMMATICAL_ERROR

the range will be moved to a grammatical error,

_WRD_GO_TO_GRAPHIC

the range will be moved to a graphic,

_WRD_GO_TO_HEADING

the range will be moved to a heading,

_WRD_GO_TO_LINE

the range will be moved to a line,

_WRD_GO_TO_OBJECT

the range will be moved to an object,

_WRD_GO_TO_PAGE

the range will be moved to a page,

_WRD_GO_TO_SECTION

the range will be moved to a section,

_WRD_GO_TO_TABLE

the range will be moved to a table.

MovementType

NUM_BIN_4 type (input parameter)

Possible values:

_WRD_GO_TO_ABSOLUTE

absolute movement,

_WRD_GO_TO_FIRST

the range will be moved to the first element,

_WRD_GO_TO_LAST

the range will be moved to the last element,

_WRD_GO_TO_NEXT

the range will be moved to the next element,

_WRD_GO_TO_PREVIOUS

the range will be moved to the previous element,

_WRD_GO_TO_RELATIVE

relative movement.

Number

NUM_BIN_4 type (input parameter)

Name

ALPHA(50) type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Creates a document in the Microsoft Word application, the name of which will be contained in a Source variable in a Visual Adelia application.

The ReturnCode parameter will be set to "0" if the method is called successfully, or to a value other than "0" if this is not the case.

Syntax

CALL_METHOD NameWordClientObject DOC_LOAD Source ReturnCode

Parameters

Source

IMAGE type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Opens the document whose full path is given in FileNamePath in the Microsoft Word application.

The ReturnCode parameter will be set to "0" if the method is called successfully, or to a value other than "0" if this is not the case.

Syntax

CALL_METHOD NameWordClientObject DOC_OPEN FileNamePath ReturnCode

Parameters

FileNamePath

ALPHA(260) type (input parameter)

ReturnCode

NUM_BIN_ 4 type (output parameter)

 

 

Prints the specified pages in the active document to Microsoft Word's default printer, taking the following parameters into account:

FromPage

number of the first page to be printed,

ToPage

number of the last page to be printed,

NbCopies

number of copies to be printed.

 

The ReturnCode parameter will be set to "0" if the method is called successfully, or to a value other than "0" if this is not the case.

 

Syntax

CALL_METHOD NameWordClientObject DOC_PRINT_OUT FromPage ToPage NbCopies ReturnCode

Parameters

FromPage

NUM_BIN_2 type (input parameter)

ToPage

NUM_BIN_2 type (input parameter)

Possible values:

integer

less than or equal to the number of pages in the document,

_WRD_ALL_PAGES

all pages with numbers higher than or equal to the starting page (FromPage) will be printed.

NbCopies

NUM_BIN_2 type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Saves the active document to disk or another medium.

The ReturnCode parameter will be set to "0" if the method is called successfully, or to a value other than "0" if this is not the case.

Syntax

CALL_METHOD NameWordClientObject DOC_SAVE ReturnCode

Parameters

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Saves the active document to disk or another medium, using the path and filename specified in FileNamePath.

The ReturnCode parameter will be set to "0" if the method is called successfully, or to a value other than "0" if this is not the case.

Syntax

CALL_METHOD NameWordClientObject DOC_SAVE_AS FileNamePath ReturnCode

Parameters

FileNamePath

ALPHA(260) type (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

 

 

Sets an option in the current document.

Option

option, the value of which is to be set.

Value

new value of the option.

 

 

Syntax

CALL_METHOD NameWordClientObject DOC_SET_OPTION Option Value ReturnCode

Parameters

Option

NUM_BIN_4 type (input parameter)

Possible values:

_WRD_SHOW_SPELLING_ERRORS

BOOL

Tells Word to underline spelling errors in the document. To display errors, use the APP_SET_OPTION method to detect them.

_WRD_SHOW_GRAMMATICAL_ERRORS

BOOL

Tells Word to underline grammatical errors in the document. To display errors, use the APP_SET_OPTION method to detect them.

Value

The type depends on the option (input parameter)

ReturnCode

NUM_BIN_4 type (output parameter)

Possible values:

_WRD_ERR_OK

Method run successfully.

_WRD_ERR_EXEC

Method failed.

_WRD_ERR_TYPE

Value does not have the right Adelia type.

_WRD_ERR_PARAM

Option has an incorrect value.

 

Example >>

 

 

 

 

 

↑ Top of page