I’m trying to compose a word document from Notes. No problem so far but the “tables.add” instruction gives me an error when trying to save the code in Lotus script. In Word the code below is no problem.
Does anyone has an explanation ?
Thanks
Set myapp= createobject(“Word.application”)
myapp.Documents.Add
StrTitel = “Title”
With myapp.Documents(1).Paragraphs(1).Range
.Text = StrTitel
.Font.Size = 18
End With
myapp.Documents(1).Paragraphs.Add
myapp.Documents(1).Paragraphs.Add
aantal = myapp.Documents(1).Paragraphs.Count
Set myrange = myapp.Documents(1).Paragraphs(aantal).Range
'This is the mentioned instruction
'myapp.Documents(1).Tables.Add Range:=myrange, NumRows:=1, NumColumns:=4
intkol = 1
For i = 1 To myapp.Documents(1).Tables(1).Columns.Count
Set myrange = myapp.Documents(1).Tables(1).Cell(1, intkol).Range
'here comes some action
intkol = intkol + 1
Next