各位大侠快救我!!!!!!

purpleshell 2003-01-09 02:23:02
用ls 创建了一个文件夹,然后打开,系统提示“无效或文档不存在“,刷新也不起作用,只有在designer中的文件夹下进行刷新后,再启动notes 后才可打开,大侠救救我
...全文
147 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
purpleshell 2003-01-10
  • 打赏
  • 举报
回复
小木可:
您好!
下面这段程序是用来生成文件夹的,文件夹能生成,只是我在其他地方用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

'*********************创建卷文件夹****************
temp=uidoc.fieldgettext("J_BH" )
temp1=uidoc.fieldgettext("J_type1")
temp2=uidoc.fieldgettext("J_Type2")
uidoc.document.saveoption="1"

str1=temp1+"/"+temp2+"/"+temp
Set doc=uidoc.document
Call doc.save(True,True)
' db.FolderReferencesEnabled = True
Call db.enablefolder(str1)
Call doc.putinfolder(str1)
Set view=db.getview(str1)
'Call view.refresh
Set doc=view.getfirstdocument
Call doc.removefromfolder(str1)

uidoc.document.status="1"
Call uidoc.save
uidoc.document.saveoptions="0"
Call workspace.viewrefresh
Call view.refresh
Call db1.openview(str1)
Call uidoc.close
小木可 2003-01-10
  • 打赏
  • 举报
回复
你好,我试了你的代码。发现这种方式只要当数据库的lastmodified属性改变后,openview才行,但是,这个属性是只读的,而且当数据库关闭后才改变。所以,你这种方式可能是不可取的。想想别的方法吧。
xlh0902 2003-01-09
  • 打赏
  • 举报
回复
在打开邮箱时,我也碰到过同样的问题,在重切换Window用户,再进入Notes试一下。
purpleshell 2003-01-09
  • 打赏
  • 举报
回复
jackyzhan(小木可) :
块帮忙呀
purpleshell 2003-01-09
  • 打赏
  • 举报
回复
各位,快帮忙呀
小木可 2003-01-09
  • 打赏
  • 举报
回复
你为啥要用LS创建文件夹,而不直接设计好?

535

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧