Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes 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 "uniq@bank.com"
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
Else
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
Else
MessageBox "No blocked addresses for this database."
End If
End Sub


Feedback number WEBBB39JDW created by ~Arnold Kinuplopader on 08/02/2018

Status: Open
Comments:

Manage blocked sender's list (~Arnold Kinuplo... 2.Aug.18)
. . I'm not saying this'll be what you ... (~Sigmund Umwema... 6.Aug.18)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS