You are here: Understanding object arguments

Understanding object arguments

An argument is an object property that you create to hold a value. Arguments can be used in VBScript as global variables. An argument can contain any value, but it should not hold a reference to an object. An argument can have any name. Meridian supports arguments for the Vault, Client, and Batch objects. Object arguments are case-sensitive.

Following is an example of obtaining email information from Client arguments:

Sub DocGenericEvent_AfterNewDocument(Batch, Action, SourceFile, DocType, DocTemplate)
	vSubject = Client.Argument("Subject")
	vSenderName = Client.Argument("From")
    	If IsEmpty(vSenderName) Then
        	vSenderName = Client.Argument("SenderName")
    	End If
    	WinMsgBox("AfterNewDocument( " & Document.FileName & _
                 " ): EmailSubject= [ " & vSubject & _
                 " ], SenderName= [ " & vSenderName & " ]")
End Sub

Some objects provide predefined arguments that are set with values by Meridian during certain commands. Although these predefined arguments may contain object references, they are validated internally in the context of their intended uses. Arguments that you create are not validated and errors can occur if they are set to objects.

Related concepts

Understanding the Meridian Enterprise Script Editor

Understanding the Microsoft Script Debugger

Understanding configuration expressions

Understanding the Meridian object model

Understanding the Meridian functions

Understanding Meridian event procedures

Understanding automation objects

Understanding VBScript and the Meridian Web Client

Understanding the CurrentPropertyName property

Related tasks

Debugging VBScript

Understanding the effects of custom scripting

Related information

VBScript examples

Formatting text with RTF codes

Meridian Enterprise command identifiers

The Meridian API constants