Lotus Doc & JavaScript

Here is my problem, is there a way to open a lotus document in notes and then close it and then open a html page all within the same hotspot button? I tried in the webqueryopen but the user would have to authenticate for the form to open. I need it within notes to create another doc in another db to count how many and who open a document.

Right now my hot spot is only pointing to the html page.

Here is my code in the queryopen:

Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)

Dim session As New NotesSession

Dim db As NotesDatabase

Dim dc As NotesDocumentCollection

Dim doc As NotesDocument

Dim NewDoc As NotesDocument

Dim item As NotesItem

Dim rdb As NotesDatabase

Set doc = source.document

Set db = session.CurrentDatabase

If doc Is Nothing Then

Exit Sub

End If

If doc.Status(0) = “Active” Then

Set rdb = New NotesDatabase(db.server, “db1.nsf”)

Set NewDoc = New NotesDocument(rdb)

NewDoc.Form = “Rept”

NewDoc.Doca = doc.Sales(0)

NewDoc.Cat = doc.CatB(0)

NewDoc.WDate = doc.XDate(0)

NewDoc.UserName = session.CommonUserName

Call NewDoc.save(True, True)

End If

End Sub

Thanks,

Subject: Lotus Doc & JavaScript

You don’t want to actually open the Notes document, just create it, right? Why would you need to open it?