小木可:
您好!
下面这段程序是用来生成文件夹的,文件夹能生成,只是我在其他地方用openview去它开它时,提示无效或文档部存在,必须在设计状态下的文件夹中刷新一下,在运行notes 就不会再抱错。
请多费心,拜托了!!!
purpleshell
Dim session As New NotesSession
Dim db As NotesDatabase
Dim db1 As notesuidatabase
Dim doc As NotesDocument
Dim view As notesview
Dim str1 As String
Dim temp As String
Dim temp1 As String
Dim temp2 As String
Dim workspace As New notesuiworkspace
Set uidoc=workspace.currentdocument
Set db = session.CurrentDatabase
Set db1=workspace.currentdatabase
' Set outline=db.getoutline("档案管理2")
'*******************控制表单中的域不能未空***************
If ( uidoc.FieldGetText( "J_BH" ) = "" ) Then
Messagebox ("请输入卷编号")
Call uidoc.GotoField( "J_BH" )
'Continue = False
End
End If
If (uidoc.FieldGetText( "J_type1" ) = "" ) Then
Messagebox( "请输入卷类型" )
Call uidoc.GotoField( "J_type1" )
'Continue = False
End
End If
If ( uidoc.FieldGetText( "J_type2" ) = "" ) Then
Messagebox( "请输入卷类型" )
Call uidoc.GotoField( "J_type2" )
End
End If
If ( uidoc.FieldGetText( "J_Builder" ) = "" ) Then
Messagebox( "请输入创卷人" )
Call uidoc.GotoField( "J_Builder" )
End
End If
If ( uidoc.FieldGetText( "J_BcPeriod" ) = "" ) Then
Messagebox( "请输入保存期限" )
Call uidoc.GotoField( "J_BcPeriod" )
End
End If
If ( uidoc.FieldGetText( "J_FM" ) = "" ) Then
Messagebox( "请输入年代" )
Call uidoc.GotoField( "J_FM" )
End
End If