I’m working on a LotuScript program that will remove all UserID files from my NAB/Domino Directory and I seem to have run into a problem that while I’m doing exactly what the help files say I should use, I get an error. Here is the code:
Dim db As New NotesDatabase( “”, “c:\names.nsf” )
Dim view As NotesView
Dim doc As NotesDocument
Dim rtitem As Variant
Dim object As NotesEmbeddedObject
Set view = db.GetView( “People” )
Set doc = view.GetFirstDocument
While Not(doc Is Nothing)
Set rtitem = doc.GetFirstItem( “$File” )
If Not ( rtitem Is Nothing ) Then
Set object = rtitem.GetEmbeddedObject( "UserID" )
Call object.Remove
Call doc.Save( True, True )
End If
Set doc = view.GetNextDocument(doc)
Wend
When I run this, I receive an error when it encounters a Person doc with a $File and I try to set the object with the GetEmbeddedObject statement. The error I receive is “Instance member GETEMBEDDEDOBJECT does not exist”.
Would appreciate any help…
Mike Sanders
Surface Transportation Board
US DOT