1、提示邮箱信息的代码- Dim s As New NotesSession 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(-1) Dim mydb
2、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展示了怎样建立、获取、和修改简要表文档的示例
3、。如果没有找到这个描述文档 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 = sessio
4、n.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 用公式打开“关于数据库”、“使用数据库”文档-Command(HelpAboutDatabase)Command(HelpUsi
5、ngDatabase)让组合框下拉时有一个空值可以选-Explode(Char(255):男:女用Messagebox判断用户做出的选择 answer% = Messagebox(Do you want to continue?, 36, Continue? If answer% = 6 Then Messagebox You cliked OK! ElseYou cliked NO! End IfEnd SubIsDocBeingEdited -检查文档的当前状态,如果文档正在被编辑,则返回 1 (True);否则返回 0 (False)。语法IsDocBeingEdited返回值flag布
6、尔型1 (True) 表示正在编辑该文档0 (False) 表示不在编辑该文档用法该函数不能用于列公式、选择公式、代理、表单公式或视图操作公式中。常用于按钮公式、隐藏公式、域公式和表单操作公式中。例:tmp := if(IsDocBeingEdited;在编辑状态;不在编辑状态);prompt(OK;提示是否在编辑状态tmp )相关主题IsDocBeingLoadedIsDocBeingMailedIsDocBeingRecalculatedIsDocBeingSaved用NotesDocument后台类改变UI文档的域值-改变当前文档中的Main_Status域值 Dim workspace
7、 As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim doc As NotesDocument Set uidoc = workspace.CurrentDocument Set doc = uidoc.Document doc.Main_Status = 5 Call doc.Save( True, True )将当前文档置于编辑模式中-Command(EditDocument;1使用LotusScript获得群组中的用户列表-DeclarationsDim count As IntegerDim persons List As
8、StringDim groups ListDim tg As IntegerDim xy As IntegerSub InitializeThe advantate of this code is that we can process any nested groups without any size limitaions.Dim session As New notessessionDim ws As New notesuiworkspaceDim uidoc As NotesUIDocumentDim db As notesdatabaseDim namesdb As notesdat
9、abaseDim groupdoc As notesdocumentDim groupview As notesviewDim insidegroupdoc As notesdocumentDim insidegroups As notesviewDim doc As notesdocumentDim curview As notesviewDim newlist ListSet db=session.CurrentDatabaseSet namesdb=session.GetDatabase(db.Server,names.nsfSet groupview=namesdb.GetView($
10、Users)Set insidegroups=namesdb.getview($VIMGroups)Set curview=db.getview(secondSet uidoc=ws.CurrentDocumentSet doc=curview.getfirstdocument you can set your own doc here. This the backend document for the currently opened uidoc. You can find other alternatives to run this agent.groupName$ =uidoc.Fie
11、ldGetText(names) Here we are entering the group or person names.Dim ritem As VariantSet ritem = doc.GetFirstItem( all ) Here we are going to store the group extracted peoples nameCall uidoc.FieldSetText(saveoptions,Total Here we will list the total participant list. making the field null to print a
12、new value.Call uidoc.SaveCall uidoc.reloadCall uidoc.saveForall entry In doc.namesgtype=group(entry) Checking whether the entry is a group or People.If gtype=Group Thentg=tg+1groups(tg)=entryElseCall addtolist(entry) If entry is a person, then adding to a list called People.End IfEnd Forallnow we have got two lists one is
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1