Opening a new meeting document in script

Hi all!

I need a script I’m writing to open up a new meeting document in the front-end and populate the “Invite” field. What it’s doing instead is opening up a new appointment document, but when I look at an existing meeting document, the form is “Appointment” and the “AppointmentType” is 3. I want this to act the same way as pressing the “Schedule a Meeting” button, then drop the list of names (it’s an array) into the “Invite” area.

Here’s what I have so far:

Set CalDoc = New NotesDocument( mailDB )

CalDoc.Form = "Appointment"

CalDoc.NOTICETYPE = "A"

CalDoc.AppointmentType = "3"

CalDoc.tmpRequired = CalList

Set CalUIDoc = uiws.EditDocument( True, CalDoc )

As I said, it just opens up a new appointment doc, so I’m confused as to what I’m doing wrong.

Any pointers anyone? :slight_smile:

Many thanks,

MaryJane Johnson.

Subject: Opening a new meeting document in script

no promises, but try

CalDoc.Form = “Appointment”

CalDoc.NOTICETYPE = “A” 'i’m not sure what this is, but i’ll leave it in

Call NotesSession.SetEnvironmentVar(“CSDocType”, “3”)

CalDoc.tmpRequired = CalList

Set CalUIDoc = uiws.EditDocument( True, CalDoc )

hth

Dana

Subject: RE: Opening a new meeting document in script

Thanks Dana, that did the trick! I’m not too clued up on environment variables. That opens up the correct document type.

I’m getting a “subscript out of range” though when trying to assign the array to the tmpRequired (“Invite”) field… anyone got any ideas about that?

Many thanks again,

MaryJane Johnson.