Using the atFunctions

Using the atFunctions

Exchange Server 2003

Using the atFunctions

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

This topic describes programming with the atFunction interfaces:

Object Model Flexibility

Most of the atFunction methods are available to more than one of the three object models--Microsoft® Outlook®, Collaboration Data Objects (CDO), and Microsoft ActiveX® Data Objects (ADO). In such cases, the atFunction provides the same functionality in each object model, although many of these functions differ according to the type of data they work with. For example, the Outlook version of a function might require an Outlook Item object, the ADO version might require a Record object, and the CDO version might require a Message or an AppointmentItem object. You can specify the correct item by setting the CurrentItem property before calling the atFunction method.

Some functions are available for only one or two of the object models. This will be noted in the description of the function in the atFunction Reference.

About Data Types

Where Lotus Notes use "lists," Microsoft atFunctions use "arrays." Where a Notes @function has a list as its parameter, the atFunction requires an array, which is typically passed as a Variant.

Examples of different data requirements are:

  • Where the Notes @function requires a text or text list, the equivalent atFunction requires a string or an array of strings.
  • Where the Notes @function requires a number, the equivalent atFunction requires a Microsoft Visual Basic® numeric data type, such as a Long.
  • Where the Notes @function requires a number list, the equivalent atFunction requires an array of numeric values, such as Longs.

While some atFunctions can technically have a Variant passed to them, they will not function properly unless data of the correct, more specific type, is passed. For example, if the original Notes @function required a text list, you need to pass an array of strings to the Microsoft atFunction method.

Data Types in atFunction References

The return values of the atFunction methods are given in the Syntax section of each method description. For example, the syntax for the atDay method is shown as follows:

Integer = atDay(DateVal As Date)

This shows that the return value for atDay is an Integer. It also shows that the function's one parameter, DateVal, is of the Date data type.

Some of the atFunction methods are not functions, but subroutines, such as the following:

Sub atError()

Because a subroutine does not return data, its Syntax section shows no return value data type.

This section contains the following topics:

Installing and Registering the atFunctions DLL

Sample Code for the Outlook Object Model

Sample Code for the CDO Object Model

Sample Code for the ADO Object Model

Show:
© 2016 Microsoft