我需要帮助从lotus domino中的names.nsf中删除csv文件中的组成员详细信息。 我从IBM站点下载了脚本以提取相同的内容,但是详细信息正在消息框中,我需要在text或csv文件中的详细信息,以便可以进一步使用。 请帮忙
脚本
Sub Initialize
Dim session As New NotesSession
Dim dbCurrent As NotesDatabase
Dim gman As New NotesGroupManager(True)
Set dbCurrent = session.CurrentDatabase
Call gman.LoadAddressBook(dbCurrent)
' Get information about all groups
Call gman.LoadAllGroups ' what happens if you comment out this line?
Dim groupList As Variant
groupList = gman.CachedGroups
Dim intCount As Integer
Dim strGroupDesc As String
Dim varSubgroups As Variant
Dim varTemp As Variant
Dim boolHasSubgroups As Boolean
Forall group In groupList
intCount = intCount + 1
boolHasSubgroups = False
strGroupDesc = "List tag: " & Listtag(group) & {
Name: } & group.Name & {
Description: } & group.Description & {
Owner: } & atImplode(group.Owner, ", ") & {
Members: }
varTemp = group.Members
Forall x In varTemp
' here's how to test whether a name is the name of a group. This is not as efficient as
' checking the Subgroups property, but I wanted to list the members in order (also,
' this will work even if we aren't in recursive mode).
If gman.getGroup(x) Is Nothing Then
' the current member is not a group.
strGroupDesc = strGroupDesc & x & ", "
Else
' emphasize a group name by putting "<<< >>>" arround it.
strGroupDesc = strGroupDesc & "<<<" & x & ">>>, "
boolHasSubgroups = True
End If
End Forall
If boolHasSubgroups Then
strGroupDesc = Left$(strGroupDesc, Len(strGroupDesc) -2) & {
AllMembers: } & atImplode(group.AllMembers, ", ")
End If
Msgbox Left$(strGroupDesc, Len(strGroupDesc) -2)
End Forall
If intCount = 0 Then
Msgbox "No groups were found."
End If
End Sub
&#13;
答案 0 :(得分:0)
使用Open Statement打开文本文件,然后循环播放数据,并使用Print # Statement
将每行附加到txtfile如果文件不存在,打开也会创建文件。
PS:Notes使用数字来标识文件,有关详细信息,请参阅函数Freefile