Programming TextMaker

<< Click to Display Table of Contents >>

Programming TextMaker

Programming the word processor TextMaker and the spreadsheet program PlanMaker is practically identical. The only difference is that some keywords have different names (for example PlanMaker.Application instead of TextMaker.Application). If you have already worked through the section Programming PlanMaker you will notice that the section you are currently reading is almost identical to it.

Naturally, the objects exposed by TextMaker are different from those of PlanMaker. A list of all objects exposed can be found in the next section TextMaker's object model.

To program TextMaker with BasicMaker, you mainly use OLE Automation commands. General information on this subject can be found in section OLE Automation.

Follow this schematic outline (see below for details):

1.Declare a variable of type Object:

Dim tm as Object

2.Make a connection to TextMaker via OLE Automation (this will launch TextMaker automatically if it is not already running):

Set tm = CreateObject("TextMaker.Application")

3.Set the property Application.Visible to True to make TextMaker visible:

tm.Application.Visible = True

4.Now you can program TextMaker by reading and writing its "properties" and by invoking the "methods" it provides.

5.As soon as the TextMaker object is not required anymore, you should cut the connection to TextMaker:

Set tm = Nothing

This was just a quick rundown of the necessary steps. More detailed information on programming TextMaker follows on the next pages. A list of all TextMaker objects and their respective properties and methods can be found in the section TextMaker's object model.