Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

Previous Next
Subject: Manage blocked sender's list
Feedback Type: Problem
Product Area: Notes Client
Technical Area: Customization
Platform: Windows
Release: 8.5.3
Reproducible: -Reproducibility-

Below script work well but I want to remove quotes in output result. The script extracts blocked sender list to text file.
example ""
Sub Initialize
Dim s As NotesSession
Dim ws As NotesUIWorkspace
Dim mailDb As NotesDatabase
Dim profile As NotesDocument
Dim dbName As Variant
Dim dbServerName As String
Dim dbFileName As String
Dim blockedArray As Variant
Set s = New NotesSession
Set ws = New NotesUIWorkspace

dbName = ws.Prompt(13, "Select Mail Database", "Select the database to extract a blocked senders list from")
If IsEmpty(dbName) Then
MessageBox "No database selected; agent quitting."
Exit Sub
End If
dbServerName = dbName(0)
dbFileName = dbName(1)
Set mailDB = s.GetDatabase(dbServerName, dbFileName)
If Not mailDb.IsOpen Then
Call mailDb.Open("", "")
End If
Set profile = mailDb.GetProfileDocument("CalendarProfile")
If profile.HasItem("$Filter_BlockAddressList") Then
blockedArray = profile.GetItemValue("$Filter_BlockAddressList")
If (UBound(blockedArray) = 0) And (blockedArray(0) = "") Then
MessageBox "No blocked addresses for this database."
Exit Sub
End If
Dim ownerName As NotesName, ownerFilePart As String
Set ownerName = s.CreateName(profile.GetItemValue("Owner")(0))
ownerFilePart = Join(Split(ownerName.Abbreviated, "/"), " ")

Dim filePath As Variant
filePath = ws.SaveFileDialog(False, "Save Blocked Senders List As", "Text Files|*.txt",,ownerFilePart + "_blocked.txt")
If IsEmpty(filePath) Then
MessageBox "No filename selected; agent quitting."
Exit Sub
filePath = filePath(0) 'converts single-element array to string
Dim fileNum As Integer
fileNum = FreeFile
Open filePath For Output As fileNum
ForAll blocked In blockedArray
Write #fileNum, blocked
End ForAll
Close fileNum
End If
MessageBox "No blocked addresses for this database."
End If
End Sub

Feedback number WEBBB39JDW created by alpanh patel on 08/02/2018

Status: Open

Manage blocked sender's list (alpanh patel 2.Aug.18)
. . I'm not saying this'll be what you ... (Mike Woolsey 6.Aug.18)


Search this forum

Member Tools

RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite