lotus 编程学习笔记.docVIP

  • 60
  • 0
  • 约3.66万字
  • 约 36页
  • 2018-03-25 发布于江西
  • 举报
lotus 编程学习笔记

lotus 编程学习笔记 用NotesDatabase.search方法来统计符合条件的文档个数 ------------- Sub Click(Source As Button) Dim session As New NotesSession Dim db As NotesDatabase Dim collection As NotesDocumentCollection 要搜索的文档的起始时间 Dim dateTime As New NotesDateTime(01/01/96) Set db = session.CurrentDatabase Search 的第一个参数是用公式语言表达的搜索条件 Set collection = db.Search(Form = qj,dateTime,0) Messagebox collection.Count End Sub 提示邮箱信息的代码 ------------------------------ Dim s As New NotesSession Dim db As NotesDatabase Dim uname As String Dim mailfileloc As Variant Const MB_OK = 1 Const MB_ICONINFORMATION=64 boxtype = MB_OK + MB_ICONINFORMATION Set db=s.CurrentDatabase uname = s.CommonUserName srvname = Evaluate(@Name([CN];@Subset(@MailDBName;1))) mailfileloc = Evaluate(@Subset(@MailDBName;-1)) Dim mydb As New NotesDatabase( Cstr(srvname(0)), Cstr(mailfileloc(0))) Msgbox Server: srvname(0) Chr$(13) _ Db directory and db name: mailfileloc(0) Chr$(13) Chr$(13)_ The size of your mail file is: _ Round(mydb.Size/1048576, 2) Mb, boxtype, Mail file of uname ... 建立/获取/修改简要表文档 ----------------------------------- 示例4-2展示了怎样建立、获取、和修改简要表文档的示例。如果没有找到这个描述文 档 docProfile 那么就会建立它,然后,它就会检查这个文档中的值 Company字段。 如果没有设置这个字段,那么就会对其进行更新,并且保存新值。如果已经进行了设置 那么就不会再进行更多的处理。 示例4-2 建立/获取/修改简要表文档 Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim docProfile As NotesDocument Dim sAuthor As String Dim itemCompany As NotesItem Set db = session.CurrentDatabase Set docProfile = db.GetProfileDocument(Profiles, session.UserName) Set itemCompany = docProfile.GetFirstItem(Company) If itemCompany Is Nothing Then docProfile.Company = ConCrea Call docProfile.save(True, False) End If End Sub 用公式打开“关于数据库”、“使用数据库”文档 ----------------------------------------- @Command([HelpAboutDatabase]) @Command([HelpUsingD

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档