Der Vollständigkeit halber hier der Auszug aus der KBASE. Es hat nicht wirklich was mit OLE direkt zu tun.
LotusScript code that accesses a third party object (a non-Lotus object) results in the following error when calling methods which contain no parameters:
"Automation object member not found."
The same code logic works within Visual Basic without error.
The following code sample demonstrates this issue. The below code runs on Windows systems to access the Assigned Directories Services (ASDi) object. When the Members method is called, the error occurs:
Dim Group
Dim Member
' Bind to a known group object.
Set Group = GetObject("WinNT://ComputerName/Administrators")
Set member = Group.Members 'The code will error when executing this line
Forall x In member
Print x.name
End Forall
Msgbox group.name ' Returns "Administrators"
Msgbox group.class ' Returns "Group"
Msgbox group.AdsPath ' Returns "WinNT://Domain/ComputerName"
If Group.IsMember("WinNT://Domain/ComputerName/csmith") Then
Msgbox "Already a Member"
Else
group.Add("WinNT://ComputerName/csmith")
End If
LotusScript requires the use of parentheses when calling the methods of non-Lotus objects, even when the methods do not have any parameters.
From the example above, the Members method call would be made as follows:
Set member = Group.Members()
Within Notes, when working with Notes objects it is recommended, but not required, to use parentheses when calling a method that does not contain any parameters.
For example, both of the following calls to GetFirstDocument (of the NotesDocumentCollection class) run without error:
Set doc = collection.getfirstdocument
Set doc = collection.getfirstdocument()
Supporting Information:
A directory service is basically a database that contains the attributes and locations of shared objects connecting the network. Users that want to access these resources may do so by using a special syntax. An assigned directory service uses a syntax which is called a namespace. For example, //CompanyName/csmith would identify a workstation and a logged-in user. The collection of all workstations and users on the network can be accessed this way from a namespace. A directory service provides a method to manage the data stored in internal tables. You can read and set security flags and descriptions.
The ability to access and/or update the Active Directories depends on the ADSi object control and is available through COM.
It is also important when using the IsMember method, that the complete ADsPath is used.
Related Documents:
Setting Third-Party Object Property to an Object Causes Error: "Automation Object Member Not Found"
Document #: 1084270