Can one of the experts tell me how I can specify a using LotusScript.
I am using XML to cerate a new document(Memo form) and populate the Body field. I have been successful in creating the form and populating the Body. I would now like to add 2 things
-
Specify an Event - ie the PostOpen Event using XML
-
Add JS to the JSHeader via XML.
Can anyone post a sample of how this may be done.
Code I am using …
Sub Click(Source As Button)
On Error Goto errrpt
link$ = "Lotus Users Forum"
url$ = "http://www.notes.net"
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim stream As NotesStream
Set stream = session.CreateStream
stream.WriteText {<?xml version='1.0' encoding='utf-8' ?>
<database xmlns='http://www.lotus.com/dxl' version='6.0'>
<code event="JSHeader" for="client">
<javascript>alert("hello")</javascript>
</code>
<document form='Memo'>
<item name='Subject'><text>DXL demo</text></item>
<item name='Body'>
<richtext>
<par>
<run>Click on this link: </run>
<urllink showborder='false' href='} & url$ & {'>
<run><font color='system'/>} & link$ & {</run>
</urllink>
</par>
</richtext>
</item>
</document>
</database>}
Dim dmp As NotesDXLImporter
Set dmp = session.CreateDXLIMporter(stream, db)
dmp.Process
Msgbox("Memo form cerated")
exit sub
errrpt:
Msgbox(dmp.log)
End Sub
thanks,