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 管先飛 閱讀(1349) 評論(0)  編輯  收藏 所屬分類: Lotus Notes
          主站蜘蛛池模板: 巴里| 方正县| 衢州市| 西安市| 张家口市| 增城市| 仲巴县| 安仁县| 阿城市| 柯坪县| 漳平市| 嘉义市| 龙里县| 安新县| 宁都县| 德兴市| 新蔡县| 南丹县| 织金县| 瓮安县| 玉屏| 卢湾区| 太和县| 舟山市| 读书| 大埔区| 中卫市| 临澧县| 泗洪县| 丰原市| 渝中区| 江永县| 乡宁县| 新津县| 萝北县| 洞口县| 平塘县| 阿巴嘎旗| 枣强县| 唐河县| 会东县|