LotusScript, based on Visual Basic, lets you create application extensions to software from IBM. This kind of language has so many similarities to VB that you may paste the code from a Visual Basic application into a LotusScript interface and compile it without errors. To open a Word document in this programming language, you must familiarise yourself with creating objects and declaring values.
- Skill level:
- Moderately Easy
Other People Are Reading
Open the application you use to edit LotusScript code.
Scroll to the part of your code where you would like to open your Word application and type the following: Dim doc As Variant. This simply declares a value ("doc") as an object that may contain any value.
Start a new line and type "Set doc = CreateObject("word.application")." This makes the "doc" variable contain a Word application object.
Create another line and type "doc.Documents.Open "C:\path-to-file\file.doc". Replace "C:\path-to-file\file.doc" with the appropriate path of the file you would like to open. This function tells the "doc" variable containing the Word application object to open a certain document.