I have been developing some agents in LotusScript to generate some MS Excel charts. The basic proccesses are OK, but I am having a little difficulty in finding the correct syntax for the objects and classes to configure the workshhet and/or charts.
Example:
I want a title in font arial, body 12, bold.
LotusScript Code:
…
With object.ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text=“Char Title”
.ChartTitle.Font.Bold = True
.ChartTitle.Font.Size = 12
.ChartTitle.Font.name = “Arial”
…
OK, the problem is where to find the correct syntax (“.ChartTitle.Font.Bold = True” or “.ChartTitle.Font = Bold”)
for the various objects and classes. Some of them I got from here, but I would like to know if is there a Classes/Objects Map or List.
Another example: I could’nt find in Excel (Tools - Macros - VBEditor), how to instruct LotusScript to maintain the scale of Y-axis with such and such configuration - Maximum, Minimum, Units etc.
This question is probably more suited for a MS VBA forum… but here are my 2 cents…
The best way to know the complete api is to open Excel VBE Editor and use the object browser.
You need to add a reference to ‘Microsoft Graph 11.0 Object Library’ to view the Graph API
What I generally do is code the VBA part in VBE and then copy paste into LS(making the minor changes). This way I get to use intellisense making it faster.
Easiest way is to open your spreadsheet in Excel, and select Tools - Macros - Record New Macro. Then do all your formatting. Stop recording, and edit the macro you just created. You should find the syntax you need, and most can be easily copied into your LS code.