guanxf

          我的博客:http://blog.sina.com.cn/17learning

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            71 隨筆 :: 1 文章 :: 41 評論 :: 0 Trackbacks

          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")
             While 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

           

          posted on 2011-12-26 00:46 管先飛 閱讀(1348) 評論(0)  編輯  收藏 所屬分類: Lotus Notes
          主站蜘蛛池模板: 固原市| 右玉县| 尖扎县| 大同市| 江都市| 南木林县| 克拉玛依市| 金门县| 巴彦淖尔市| 峨眉山市| 嵩明县| 鸡泽县| 宣汉县| 阿拉善盟| 长子县| 霍城县| 阳谷县| 潢川县| 金川县| 渝北区| 辰溪县| 罗山县| 嘉鱼县| 安宁市| 浙江省| 台东市| 防城港市| 东阳市| 丹巴县| 嘉善县| 文山县| 宁海县| 镇赉县| 阿合奇县| 富平县| 金昌市| 大石桥市| 公安县| 临海市| 永修县| 京山县|