Sub Initialize
Dim session As NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim userName As String
Set session = New NotesSession
Set db = session.currentdatabase
userName = "Vorname Nachname/Organisation"
Set doc = db.getprofiledocument("ProfileName", userName)
If doc Is Nothing Then
Msgbox "No ProfileName...Closing the agent"
Else
doc.remove(True)
Msgbox "ProfileName removed"
End If
End Sub