Click or drag to resize

IScriptingEventsOnSelectionMailMergeStart Method

Identity is the id of the current object.

Namespace:  SuperOffice.COM.ScriptEvents
Assembly:  Scripting.Interop (in Scripting.Interop.dll) Version: 8.0.0.0
Syntax
void OnSelectionMailMergeStart(
	int identity
)

Parameters

identity
Type: SystemInt32
selection_id
Examples

Description

This text may be copied to the notepad, and saved as a *.vbs file.

VB
Sub OnSelectionMailmergeStart
    Set myContacts = Database.Find.ContactsByName(Database.GetAssociate(Database.UserAssociateId).FullName & " workday")
    set myContact = myContacts.GetFirst
    If myContacts.EOF Then
        'No contact exist, create it.
        Set myContact = Database.CreateContact
        myContact.SetDefaults
        myContact.Name = Database.GetAssociate(Database.UserAssociateId).FullName & " workday"
        myContact.Save
    End If

    Set soApnt = Database.CreateAppointment
    soApnt.SetDefaults
    soApnt.Contact = myContact
    soApnt.Description = Now() & ": " & currentselection.name & " - mail merge started"
    soApnt.Save    

End Sub

See Also