1.將菜单栏上按钮如帮助等需要屏蔽掉
Declare Function GetActiveWindow& Lib "User32"()
Declare Function SetMenu% Lib "User32"(Byval win&,Byval y&)

Sub Click(Source As Button)

LotusWin=GetActiveWindow()

Call SetMenu(LotusWin,0)

End Sub
以上在數據庫打開時調用運行

2.notes designer的select 和radio 框 的选项域值 是不是在web页上是乱码?
呵呵 按我得方法可以避免,
选择 为选项使用公式 公式这样写:
tempValue :={这里可以是多值字符列表,也可以是公式取值};
tempValue + "|" +tempValue

这样就可以保证选项的名和域值保持一致,而不是一串乱码英文字母。

3.表单中有一个域FDFwrq  其值为  “张三 2005-1-8”  前半部为当前用户的签名,后面为签名的时间,现在想单独把后面的时间提取出来,该怎么做?
javascript:var str=FDFwrq.value;
            str=str.substr(str.indexOf(" "),str.length)
lotusscript:
str1=document.forms[0].FDwrq.value
str2=strright(str1,"") 'str2=2005-1-8
str3=strleft(str1,"") 'str3=张三

4.如何用公式判断,如果用户不是当前作者,就隐藏某个域!
在域的隐藏条件里写:@IsNotMember(@UserName;@Author),记得同时选中公式前的checkbox.

5.http://www.5dmail.net/html/2004-12-30/20041230124558.htm

成批重新验证用户标识符

使用 Administration Process 来重新验证将要到期的层次标识符。
1.要重新验证用户标识符,必须对“Domino 目录”有“作者”存取级别并可以创建文档,或者是“编辑者”存取级别,对 Certification Log 至少有“作者”的存取级别,并可以创建文档
2.在 Domino Administrator 中,单击“个人和群组”。
3.选择要用相同的验证者来重新验证的用户(如果都做就全选好了,我懒得挑,就来了个全选)。
4.从工具窗格中,选择“个人”“重新验证”。
5.选择原来验证所选用户的验证者标识符(cert.id),并单击“打开”。
6.输入所选的验证者标识符的口令并单击“确定”。
7.新的验证字过期日期(当前日期的两年后)或输入不同的日期
8.(可选)输入一个日期以仅验证所选用户标识符的子集(根据其当前过期日期)。
9.单击“验证”,随后单击“确定”。

这样用户在连接服务器时,他的notes.id中的相关内容就被修改了.,
6.設置自動回復:
进入信箱后,“工具”—>“离开办公室”后弹出设置窗口,设置离开日期和返回日期,“离开办公室消息”等后,点击“启用”就可以了。

7.使用rtf域在b/s上存储内容突破域大小限制的问题
很多时候,存储超过64k的限制,在这个时候:
RichTextItem rtf = (RichTextItem) doc.getFirstItem(“ItemName”);
rtf.appendText(“html 内容”);
rtf.apendText(“………..”);

在domino中,如果内容超过限制,domino 会自动在文档中生成多个同名域来存储相关内容。
8.使用rtf域显示随机生成的html代码
首先:要确定,超过64k的时候一定要使用第一点所表述的方法。
其次:如果在页面上没有正确的显示html代码所描述的界面,而是将html代码显示出来,解决方法如下:
A、如果存在循环
for(int i=0;i<n;i++){
   rtf.apendText(“[”);
   …………….
   循环主体
   …………….
   rtf.apendText(“]”);
}
要注意在取rtf域时的方法
if(doc.hasitem("ItemName")) doc.removeItem("ItemName");
RichTextItem rtf = (RichTextItem) doc.getFirstItem("ItemName");

9.如何屏蔽FORM的雙擊事件,讓用戶只能按EDIT按鈕進行編輯?

在套表的Globe:
(Declarations):
Dim editflag As Integer
Sub Initialize
editflag=0
End Sub

在套表事件QueryModeChange中:
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
If editflag=0 And Not Source.EditMode Then continue=False
End Sub

編輯的按鈕中:
Sub Click(Source As Button)
Dim ws As New notesuiworkspace
editflag=1
ws.currentdocument.editmode=True
End Sub
10.如何建立流水號?
代理程式如下:(需自己更改其中一些項目,以下僅供參考)

Sub Initialize
Dim ws As New NotesUiworkspace
Dim uidoc As Notesuidocument
Dim s As New Notessession
Dim db As notesdatabase
Dim view As notesview
Dim doc As notesdocument

Set uidoc=ws.currentdocument
Set db=s.currentdatabase
Set doc=uidoc.document

'==begin=====以下程式需視實際情況來修改編碼原則
Dim title As String,title1 As String,yr As String,mh As String
title = uidoc.fieldgettext("Fld_Type") '取出類別,決定是用"PE-"或是"ME-"
title1= uidoc.fieldgettext("Fld_location")
If title="電子類" Then
title="PE-"
Else
title="ME-"
End If
If title1="YingKo" Then
title1="Y"
Else
title1="J"
End If
yr = Right(Cstr(Year(doc.created)),2) '取出年份
Dim key(2) As String
key(0) = title
key(1) = title1
key(2) = yr
'==end==

Dim sqdoc As Notesdocument
Set view=db.getview("(sq_view)")
Set sqdoc=view.getdocumentbykey( key ) '以title,title1及年份為key值,尋找是否已有流水號文件
If sqdoc Is Nothing Then '以下為新文件時,即產生一新編號,並存檔 doc.Fld_ApprovalNo=title+title1+yr+"0001" '此需視所要填入的欄位,改其欄位名稱
Dim newdoc As New Notesdocument(db) '產生一份新文件
newdoc.Form = "sq"
newdoc.sq_title = title
newdoc.sq_location = title1
newdoc.sq_year = yr
'newdoc.sq_month = mh
newdoc.sq_no = "01"
Call newdoc.save(True,True)
Else '已有編號產生
Dim sqno As String
sqno = Cint(sqdoc.sq_no(0)) '取出目前的文件編號為多少
sqno = sqno+1
nsqno = Cstr(sqno)
nsqno = String$(4-Len(nsqno),"0")+nsqno
doc.Fld_ApprovalNo = title+title1+yr+nsqno '此需視所要填入的欄位,改其欄位名稱
sqdoc.sq_no = nsqno
Call sqdoc.save(True,True)
End If
End Sub

posted on 2005-02-16 08:38  James Wong   阅读(947)  评论(1编辑  收藏  举报