.
HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1
212-599-2048
Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development
Chat now
.
EN - English
CN - 中文
JP - 日本語
DE - Deutsch
FR - Français
BR - Português
RU - Pу́сский
IT - Italiano
IN - हिन्दी
ES - Español
KR - 한국어
ID - Indonesia
NL - Dutch
TR - Türkçe
SA - العربية
SE - Svenska
NO - Norsk
PL - Polski
TH - ไทย
DK - Dansk
MY - Malay
PH - Filipino
GR - Ελληνικά
FI - Suomi
IL - עברית
IE - Gaeilge
CZ - Čeština
UA - Українська
RO - Română
VN - Tiếng Việt
BD - বাংলা
HU - Magyar
Need a Domino Consultant? Call NotesMail +1 212-599-2048
-
HCLSoftware Business Partner
LOTUSSCRIPT/COM/OLE CLASSES
Examples: Remove method
1. This script removes a document from a database, unless another user has modified it.
Dim doc As NotesDocument
'...set value of doc...
If doc.Remove( False ) Then
Messagebox _
( "The document was deleted from the database." )
Else
Messagebox _
( "Doc not deleted. Another user modified it." )
End If
2. This script removes a document from a database, regardless of whether another user has modified it. It does not use the Remove method's return value.
Dim doc As NotesDocument
'...set value of doc...
Call doc.Remove( True )
3. This script gets the universal ID of the current UI document, marks the document for deletion and closes it. The script then retrieves the back-end NotesDocument object from the database and removes it with the NotesDocument Remove method.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim docA As NotesDocument
Dim s As String
Set db = session.CurrentDatabase
Set uidoc = workspace.CurrentDocument
Set docA = uidoc.document
s = docA.UniversalID
Call uidoc.deletedocument()
Set docB = db.getDocumentByUNID(s)
Call docB.Remove(True)
Call workspace.viewrefresh()
4. This script removes all of the documents in the view called "My Favorites."
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim collection As NotesViewEntryCollection
Dim entry As NotesViewEntry
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("My Favorites")
Set collection = view.AllEntries
Set entry = collection.GetFirstEntry()
While Not(entry Is Nothing)
Set doc = entry.Document
doc.Remove(True)
Set entry = collection.GetNextEntry(entry)
Wend
See Also
Remove method
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Feedback on
Help
or
Usability
?
Help on Help
All Help Contents