1、FTSearch搜索:
Set dc=db.Ftsearch("name",0)
'0位置为最大的查询数,0为所有匹配的文件 FTSearch必须创建数据库索引
Set doc=dc.Getfirstdocument()
2、Item:
Set doc=dc.Getfirstdocument()
While Not doc Is Nothing
ForAll ritem In doc.Items
MsgBox ritem.name
End ForAll
Wend
3、取出特定的域
Set doc=view.getFirstdocument()
If doc.HashItem("yu") <> "" Then
Set item=doc.getfirstitem("yu")
Set doc=view.getNextdocument(doc)
End If
4、使用文本属性
If doc.Hashitem("yu") <> "" Then
Set doc=dc.Getfirstdocument()
While Not doc Is Nothing
ForAll itemValue In doc.yu
itemValue = "Anonymous"
End ForAll
Set doc=dc.Getnextdocument(doc)
Wend
End If
5、获取域值:
ForAll itemValue In doc.Getitemvalue("yu")
6、添加域
set item =new NotesItem(doc,"newYu",session.UserName)
Call doc.Appenditemvalue("newYu",Newvalue)
7、替换值:
1)、 While Not doc Is Nothing
Call doc.Replaceitemvalue("resName","newValue")
Set doc=dc.getnextdocument(doc)
Wend
2)、Set doc=dc.Getfirstdocument()
While Not doc Is Nothing
'Call doc.Replaceitemvalue("resName","newValue")
Set item =doc.Getfirstitem("yu")
While Not item Is Nothing
ForAll resitems In doc.Itemsv(0)
resitems="newVlaue"
End ForAll
doc.name= doc.Itemsv(0)
Set item =doc.getnextitem(item)
Wend
Set doc=dc.getnextdocument(doc)
Wend
8、拷贝域
Set item =doc.Getitemvalue("name")
call item.Copyitemtodocument(doc, "name")
call doc.save(true,false)
call doc1.Copyallitems(doc2,true) ‘替换所有的
9、删除指定的域:
1)、 For j=1 To dc.count
Set item=doc.Getitemvalue("name")
Wile Not item Is Nothing
Call item.Remove()
Call doc.Save(true,false)
Wend
Set doc=dc.Getnthdocument(j)
Next
2)、For j=1 To dc.count
While Not doc.Hasitem("name")
Call doc.Removeitem("name")
Call doc.Save(True,false)
Wend
Set doc=dc.Getnthdocument(j)
Next
10、RTF文本域的输出:
Set item=doc.GetFirstItem("RtfYU")
MsgBox item.Text
11、在代理中使用公式:
temp=Evaluate("@ReplaceSubstring(aa;bb;cc)",doc)
12、 嵌入对象:
ForAll csx In doc.Embeddedobjects
csx.name
End ForAll
Set doc=dc.Getnthdocument(j)
Next
13、激活嵌入对象:
Call doc.EmbeddedObjects(0).Activate(True)
14、if的用法
Set doc=dc.Getfirstdocument()
If Not IsEmpty(db.Agents) Then
ForAll agent In db.Agents
MsgBox agent.name
End ForAll
End If
分享到:
相关推荐
综合使用JavaScript、LotusScript Agent和Formula的技巧
综合使用JavaScript、LotusScript_Agent和Formula的技巧
LotusScript基本语法知识,个人收集和总结,希望对大家有帮助.
LotusScript语法入门中文版 PDF格式。
LotusScript程序开发经验总结LotusScript程序开发经验总结LotusScript程序开发经验总结LotusScript程序开发经验总结LotusScript程序开发经验总结LotusScript程序开发经验总结LotusScript程序开发经验总结LotusScript...
LotusScript for the Terrified R5 Update.pdf
LotusScript学习资料
分四个部分,都只是与lotusscript相关的。 1,用LotusScript访问修改数据库,包含lotusscript基础 2,用户界面操作 3,创建和修改文档 4,使用On Error敘述追踪 runtime错误
lotusscript技巧介绍
LotusScript程序设计,做为一个DOMINO开发人员这个你都没有,怎么行呢。10分值
B/S模式通过LotusScript直接导出txt文件,文件中只有最重要的输出部分,其余需自行补充完成。
LotusScript学习资料,详细介绍了LotusScript的语法,配有丰富的例子;值得一看……
lotusscript适合初学者学习,快来下载吧。
LotusScript语言的使用基本知识与样例, LotusScript语言的使用基本知识与样例, LotusScript语言的使用基本知识与样例
Lotusscrip与Vb语法对比,英文版。
lotusScript(代理)导入Excel
非常不错LotusScript入门向导,适合初学者
Lotus脚本语言以及其相关的功能讲义 Lotus脚本语言以及其相关的功能讲义 Lotus脚本语言以及其相关的功能讲义
LotusScript中文帮助文档(R4版本的),感觉还是很有用的!分享给大家了!
domino开发中的,关于Lotusscript开发帮助手册。