Recent Contacts Tuning But these parameters are still…

Recent Contacts Tuning

But these parameters are still interesting, because there is no UI representation:


Using these parameters, you can exclude all recipients from the recent contacts matching one of the strings (example: will be removed).

Since version 8.5.2, these parameters will also delete already existing documents from the recent contacts view matching one of the specified strings.
In prior versions, they prevent only new addresses to be added to recent contacts.

But it is not predictable when these paramters take effect. In my tests, we had anything from immediatelly up to several days.

If you want to delete some recent contacts, for example all users from your own domain (or even all documents), you can use this example code.
Just replace “domainA” with the search string you want to remove. This example supports only one searchstring, but it is quite easy to customize it for your needs.

Sub Initialize
Dim session As New NotesSession
Dim SearchStr As String

SearchStr = “domainA”

‘set notes.ini parameters
SearchStr = LCase(SearchStr)
Call session.Setenvironmentvar(“DPABRemoveRule”, SearchStr, True)
Call session.Setenvironmentvar(“DPABRemoveRuleSetting”, “1”, True)
Call session.Setenvironmentvar(“DPAB_PROMOTE_INC”, “10”, True)
Call session.Setenvironmentvar(“NEXTDPABSYNC”, “”, True)
Call session.Setenvironmentvar(“LAST_RECENT_CONTACT_CHECK”, “”, True)
Call session.Setenvironmentvar(“NeedDPABcache”, “”, True)

‘remove recent contact documents
Dim nab As NotesDatabase
Set nab = session.getdatabase(“”,”names.nsf”)
Dim rview As NotesView
Set rview = nab.Getview(“($RCLookup)”)
Dim doc As NotesDocument
Dim doc2 As NotesDocument
Set doc = rview.Getfirstdocument()
While Not doc Is Nothing
Set doc2 = rview.Getnextdocument(doc)
Dim address As String
address = LCase(doc.Getitemvalue(“$DPABDIPNAME”)(0))

If InStr(address, SearchStr) > 0 Then
Call doc.Removepermanently(True)
Print “deleted recent contact: ” & address
End If

Set doc = doc2

MessageBox “Recent contacts successfully removed”
End Sub

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do

Você está comentando utilizando sua conta Sair /  Alterar )

Foto do Google

Você está comentando utilizando sua conta Google. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )

Conectando a %s