LOTUSACTION语句详解.doc_第1页
LOTUSACTION语句详解.doc_第2页
LOTUSACTION语句详解.doc_第3页
LOTUSACTION语句详解.doc_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

LOTUS ACTION语句详解 2007-06-12 14:481、NotesUIWorkspace用法使当前文档可编辑Sub Click(Source As Button) workspace As New NotesUIWorkspace Call workspace.EditDocument( True )End Sub使当前文档可编辑,然后把焦点移到body域中Sub Click(Source As Button)dim ws as new notesuiworkspacedim uidoc as notesuidocumentset uidoc=ws.editdocument(true)call uidoc.gotofield(body)End Sub2、notessession用法返回当前数据库下所有文档的总数dim s as notessessiondim db as notesdatabaseset db=s.currentdatabasedim collection as notesdocumentcollectiondim n as integerset collection=db.alldocumentsn=collection.count3、notesdocument用法判断文档中是否包含subject域dim doc as notesdocumentif doc.hasitem(subject) thenMessagebox(There is a Subject item on this document)elsemsgbox(There is no Subject item on this document)end if4、NotesView用法取得当前数据库的视图与标题Sub Click(Source As Button)dim s as notessessiondim db as notesdatabaseset db=s.currentdatabasedim view as notesviewset view=db.getview(v_all)if not view is nothing then messagebox()End Sub5、getfirstitem用法给Categories域添加Girls Boys and Toys值dim doc as notesdocumentdim item as notesitemset item=doc.getfirstitem(Categories)dim newvals(1 to 3) as stringnewvals(1)=girlsnewvals(2)=boysnewvals(3)=toyscall item.appendtotextlist(newvals)call doc.save(false,true)给Categories域添加shocks值dim doc as notesdocumentdim item as notesitemset item=doc.getfirstitem(Categories)call item.appendtotextlist(shocks)call doc.save(false,true)5、NotesRichTextItem的用法创建一个ProjectDescription 文本域,然后给它赋值dim doc as notesdocumentdim rtitem as notesrichtextitemset rtitem =new notesrichtextitem(doc,ProjectDescription)call rtitem.appendtext(test)call doc.save(false,true)把doca的拷贝到docbDim docA As NotesDocumentDim docB As NotesDocumentDim rtitem As NotesRichTextItem.set values of docA and docB.Set rtitem = New NotesRichTextItem _( docA, ProjectDescription )Call rtitem.AppendText _( Cartoon book for children ages 9-12 )Call rtitem.CopyItemToDocument( docB, )Call docA.Save( False, True )Call docB.Save( False, True )创建一个body邮件备忘录,然后用邮件的方式发送给Frank Glenneldim session as notessessiondim db as notesdatabaseset db=session.currentdatabasedim memo as notesdocumentdim rtitem as notesrichtextitemset rtitem=new notesrichtextitem(memo,body)call rtitem.appenddoclink(doc,db.title)memo.subject=testcall memo.send(false,Frank Glennel)如果project域为richtext域,则增加新的内容dim doc as notesdocumentdim rtitem as variantset rtitem=doc.getfirstitem(project)if rtitem.type=richtext thencall rtitem.addnewline(1)call rtitem.appendtext(test)call doc.save(false,true)6、NotesUIDocument 的用法保存当前文档dim ws as new notesuiworkspacedim uidoc as notesuidocumnetset uidco=ws.currentdocumencall uidoc.save根据status状态不同,给sendto域赋不同值Sub Querysave(Source As Notesuidocument, Continue As Variant) s = source.FieldGetText( Status ) Select Case s Case New : Call source.FieldSetText _ ( SendTo, source.FieldGetText( Manager ) ) Case Approved : Call source.FieldSetText _ ( SendTo, source.FieldGetText( HRContact ) ) Case Rejected : Call source.FieldSetText _ ( SendTo, source.FieldGetText( Employee ) ) End Select Call source.SendEnd Sub7、messagebox的用法返回当前通讯录文件夹下所有通讯录的名称与路径Sub Click(Source As Button)i%=Messagebox(您真的要升级吗?,289,版本升级)Dim session As New NotesSessionDim db As NotesDatabaseaddressBooks = session.Ad

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论