MSWORD2

Purpose:

Inserts a metafile of a Worksheet into MS Word using ActiveX.

Syntax:

MSWORD2

Returns:

Nothing. It creates and inserts a Worksheet into MS Word.

Example:

msword2

 

creates a new example Worksheet in DADiSP, then starts MS Word and inserts the metafile of the Worksheet into the current Word document.

Remarks:

MSWORD2 is a simple example of how to invoke an external application (MS Word) as an ActiveX server using SPL. SPL uses an ActiveX syntax similar to C++ and Visual Basic.

 

Here are the pertinent SPL statements:

 

copyworksheet();                         // copy Worksheet to clipboard
word = createobject("Word.Application"); // start Word
doc = word.Documents;                    // get Doc object
range = doc.Add().Range();               // get Range object
word.Visible = 1;                        // show on screen

 

See MSWORD for an example of copying text.

See Also:

CREATEOBJECT

GETOBJECT

MSWORD