#6579
Support 1a
Participant

    You want to add the message directly into the Calendar message store. The technique you were using (the GroupWise.ItemSet… commands) are generally used when you are working with items via the standard GroupWise user interface. To add messages directly into the message store with no normal GroupWise user interface (you could add your own Formativ UI if appropriate), use the methods under GroupWise.Account.

    Here’s an example of how to add a personal task using this technique:

    Sub Main(Client, GWEvent)
    
      dim objTask
    
      ' Create the new task
      set objTask = GroupWise.Account.Calendar.Messages.Add("GW.MESSAGE.TASK", 3)
    
      ' Set some properties
      objTask.OnCalendar = TRUE
      objTask.FromText = GroupWise.Account.Owner.DisplayName
      objTask.TaskCategory = "A"
      objTask.TaskPriority = 1
      objTask.Subject = "This was created using Formativ"
      
      ' Make it due 7 days from now
      objTask.DueDate = Date + 7
    
    End Sub

    You may want to have a look in the ‘Programmers Guide’ for more examples and information.

    Regards,

    Advansys Support