Appending html to body field when sending meeting invites

I want to make an addition to scheduled meetings so that our users can connect a meeting with our phone conference system, which is a bought service (InterCall). We are not using the built-in capabilities in Notes. Very simple really, if our users check a checkbox “Phone Conference” I add a “Conference Code” to the meeting document. However, when the meeting invites are send out, I want to add a HTML file to the body field, with general information about how to call in, phone numbers etc.So I have added a call to the code that does this in the QuerySend event - below

Sub Querysend(…)

if Source.IsNewDoc Then

 If Source.Document.IsNewPhoneConfSys(0) = "1" Then 

Call FormQuerySend(Source, Continue)

			End If

	End If

End Sub

I have two problems - 1. often the QuerySend event simply doesn’t seem to fire!!! - so obviously the code is never called.

  1. when the code is called (querysend fires) - then I get “Document command not available” when trying to import the html file. Code that does this is:

Call uidoc.GotoField(“Body”)

Call uidoc.gotobottom

Call uidoc.import(“HTML File”, filedir & “\dc_meeting.htm”)

The exact same approach has been used in our 6.5.6 environment with no problems. Now I am preparing our shift to 8.5.1 and having these challenges. Help, tips, hints, anything would be appreciated

Thanks,

Thomas

Subject: solution

If anyone find it interesting, here’s what solved my problem - embed the code in a string and execute the string (strange, but it works)

Dim script As String

	

script  = |

						Dim s As New NotesSession

Dim db As NotesDatabase

Dim profileDoc As NotesDocument

Dim wksp As New NotesUIWorkspace

Dim uiDoc As NotesUIDocument

Dim rtitem As NotesRichTextItem	

    Dim object As NotesEmbeddedObject

Dim msgTxt as string



					Set db = s.CurrentDatabase			Set uiDoc = wksp.CurrentDocument		call uidoc.import("HTML File","| & strFile & |")

						uidoc.document.save false, false

uidoc.reload

|



Call uidoc.GotoField("Body")

Execute(script)

Call uidoc.GotoField("Body")