Chinaunix首页 | 论坛 | 博客
  • 博客访问: 376493
  • 博文数量: 1051
  • 博客积分: 53280
  • 博客等级: 大将
  • 技术积分: 6670
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-09 13:21
文章分类

全部博文(1051)

文章存档

2011年(1)

2008年(1050)

我的朋友

分类:

2008-09-09 15:44:30



  大家都知道,每一个Notes用户必须都有一个单独的notes.ini文件和desktop.dsk文件,用户混合使用工作台上会有大量不属于自己的数据库,这样限制了工作站上的用户的使用。下面是解决这一问题的小技巧:
  1。首先在服务器上正常安装第一个用户.然后注册所有的用户。
  2。拷贝所有的用户标示符到工作站。这些文件都在文件夹/data/ids下后缀.id。
  3。改变用户标示符。选择菜单 文件--工具--切换用户标示符,在目录底下找到想要使用的表示符文件,最后选择使用。输入注册时使用的密码即可。
  4,在用户视图和地址本中建立一个操作热点,标为“用户文档”,热点代码如下:
  Sub Click(Source As Button)
  Dim session As New Notessession
  Dim notesdirectory As String
  notesdirectory = session.GetEnvironmentString( \"Directory\", True)
  Dim keyfilename As String
  keyfilename = session.GetEnvironmentString( \"KeyFilename\" , True)
  Dim whois As String, realwho As String
  Dim workspace As New NotesUIWorkspace
  Dim doc As NotesUIDocument
  Dim uidoc As NotesUIDocument
  Set uidoc = workspace.EditDocument(False)
  Dim item As NotesItem
  Dim first As String, last As String, mailserver As String, mailfile As String
  Dim mailserver1 As String, mailfile1 As String
  Dim short As String
  Dim short1 As String
  Dim udir As String
  Dim full As String
  Dim ppass As String
  Dim thisdb As NotesDatabase
  
  whois = session.CommonUserName
  realwho = session.UserName
  Set thisdb = session.CurrentDatabase
  Set uidoc = workspace.EditDocument(False)
  first = uidoc.FieldGetText(\"FirstName\")
  last = uidoc.FieldGetText(\"LastName\")
  short = uidoc.FieldGetText(\"ShortName\")
  mailfile = uidoc.FieldGetText(\"MailFile\")
  spaceposition = Instr(1,mailfile, \"\\\")
  short = Mid( mailfile, spaceposition + 1)
  mailfile1 = \"mail\\\\\" + short
  mailserver = uidoc.FieldGetText(\"MailServer\")
  If first <> \"\" Then
  full = first + \" \" + last
  Else
  full = last
  End If
  Call uidoc.Close
  Print \"got Person data\"
  
  \' Build new rec
  \'
  Set uidoc = workspace.ComposeDocument ( \"\", \"names.nsf\", \"Location\" )
  Call uidoc.FieldSetText(\"Name\",full)
  udir = notesdirectory
  short1 = keyfilename
  Call uidoc.FieldSetText(\"Userid\", udir + \"\\\" + short1)
  Call uidoc.FieldSetText(\"Domain\",\"LADWP\")
  Call uidoc.FieldSetText(\"DST\",\"1\")
  Call uidoc.FieldSetText(\"Enabled\",\"0\")
  Call uidoc.FieldSetText(\"NameLookupPref\",\"2\")
  Call uidoc.FieldSetText(\"ExhaustiveNameLookup\",\"1\")
  Call uidoc.FieldSetText(\"Images\",\"0\")
  Call uidoc.FieldSetText(\"LocationType\",\"0\")
  Call uidoc.FieldSetText(\"MailFile\", mailfile)
  Call uidoc.FieldSetText(\"MailServer\", mailserver)
  Call uidoc.FieldSetText(\"Source\",\"*\")
  Call uidoc.FieldSetText(\"TimeZone\",\"8\")
  Call uidoc.FieldSetText(\"WebRetriever\",\"Netscape Navigator\")
  Call uidoc.Save
  Call uidoc.Close
  \'
  \' Add the mail database to the workspace
  \'
  If whois = full Then
  spaceposition = Instr(1, mailserver, \"/\")
  If spaceposition = 0 Then
  spaceposition = 30
  End If
  mailserver1 = Left$( mailserver, spaceposition - 1)
  Call workspace.AddDatabase( mailserver1 , mailfile1 )
  Messagebox \"the mail database for: \" & full & Chr(10) & \" has been added to the workspace, and \" & Chr(10) & \"Location
  Document added to Address Book\"
  Else
  Messagebox \"Location Document for: \" & full & \" added to Personal Address Book\"
  End If
  End Sub
  


  


 相关文章  热门文章











--------------------next---------------------

阅读(196) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~