/ Forums / Advansys Formativ / Creating Solutions with Formativ / Create Appointment (all-day and without recipient) / Reply To: Create Appointment (all-day and without recipient)

#7774
Support 3
Participant

Please refer to “Formativ Language Guide”, “Formativ Developers Guide” and GroupWise Object API for more information about creating message. See below the sample code from the “Formativ Developers Guide” about creating appointment:

quote:


You can create any kind of message without a user interface. You would normally use this approach when you have all the information required to create a new item,
and there is no need for user interaction. For example, you may write an Applet to read email addresses from a database,
then create and send a customized email message to each address.
In this case there is no need for a user to see the actual messages being composed.

Although there are several variations, the most common way to create a new message is this:
Call the Add method of the Messages collection owned by the folder in which you wish to store the message. For example,
the following Applet creates a new personal GroupWise Appointment in your own calendar:

Sub Main(Client, GWEvent)  
    Dim objMessage  

    ' Create the new message   
    Set objMessage = GroupWise.Account.Calendar.Messages.Add("GW.MESSAGE.APPOINTMENT", 3)  
 
    ' Set some properties   
     objMessage.OnCalendar = True   
     objMessage.FromText = GroupWise.Account.Owner.DisplayName   
     objMessage.Subject = "This was created using Formativ"  
 
     ' Display the MessageID of the new message   
     MsgBox(objMessage.MessageID)  
End Sub

Hope this helps.

Regards,
Advansys Support

[This message was edited by Support 1 on November 13, 2006 at 03:37 PM.]