Now its very easy to create a new symphony document/spreadsheet using LotusScript.
Step 1: Just create a new form an create an actions and name it as “Generate Symphony Document”.
Step 2: Then include Lotusscript Source(LSS) file in options as follows,
%INCLUDE “symphonylsx.lss”
Step 3: Now you can access the Lotus Symphony classes.
Step 4: Now write the following code in the action.
Sub Click(Source As Button)
On Error Goto errorHandler
Dim symdoc As SymphonyApplication
Set symdoc = New SymphonyApplication
Dim documents As SymphonyDocuments
Set documents = symdoc.Documents
Dim document As SymphonyDocument
Set document = documents.AddDocument(”",True,True) ‘ Syntax is below
‘Set document = documents.AddDocument(Template, AsTemplate, Visible)
Dim range As SymphonyTextRange
Set range = document.Content.End
Call range.InsertBefore(”My Symphony document”)
Exit Sub
errorHandler:
Msgbox “Error “& Chr(34) & Error() & Chr(34) & ” on Line number ” & Erl()
Exit Sub
End Sub
Step 5: Now preview the form and click the action button. A new symphony document will open and “My Symphony document” is written in that document.
Note : If you want the properties and methods of the symphony class, for help see the reference tab in left side of the programming pane while writing code.
We will discuss more about this in next post.
Step 1: Just create a new form an create an actions and name it as “Generate Symphony Document”.
Step 2: Then include Lotusscript Source(LSS) file in options as follows,
%INCLUDE “symphonylsx.lss”
Step 3: Now you can access the Lotus Symphony classes.
Step 4: Now write the following code in the action.
Sub Click(Source As Button)
On Error Goto errorHandler
Dim symdoc As SymphonyApplication
Set symdoc = New SymphonyApplication
Dim documents As SymphonyDocuments
Set documents = symdoc.Documents
Dim document As SymphonyDocument
Set document = documents.AddDocument(”",True,True) ‘ Syntax is below
‘Set document = documents.AddDocument(Template, AsTemplate, Visible)
Dim range As SymphonyTextRange
Set range = document.Content.End
Call range.InsertBefore(”My Symphony document”)
Exit Sub
errorHandler:
Msgbox “Error “& Chr(34) & Error() & Chr(34) & ” on Line number ” & Erl()
Exit Sub
End Sub
Step 5: Now preview the form and click the action button. A new symphony document will open and “My Symphony document” is written in that document.
Note : If you want the properties and methods of the symphony class, for help see the reference tab in left side of the programming pane while writing code.
We will discuss more about this in next post.
No comments:
Post a Comment