免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3074 | 回复: 3

[Lotus] 如何实现退出时不保存的功能? [复制链接]

论坛徽章:
0
发表于 2007-01-05 13:46 |显示全部楼层
Sub Click(Source As Button)
        Dim ws As NotesUiWorkspace
        Dim uidoc As NotesUIDocument
        Dim doc As NotesDocument
        Dim sess As NotesSession     
        Dim rep  As Integer
       
        Set ws = New NotesUIWorkspace
        Set sess = New NotesSession     
        Set uidoc = ws.currentdocument
        Set doc = uidoc.document
        uidoc.AutoReload = False
        uidoc.EditMode = True
        rep = ws.DialogBox( "TrainingRecord",True, True, False, False, _
        False, False, "Please input." )
       
        If rep Then         
                Dim tmp As String
                Dim tmpRecords As Variant
                Dim tmpType As String
                Dim tmpTraining As String
                Dim tmpInstructor As String
                Dim tmpLicense As String
                Dim x As Integer         
               
                tmpRecords = doc.Records
                tmpType = doc.Type1(0)
                tmpTraining = doc.Training1(0)
                tmpInstructor = doc.Instructor1(0)
                tmpRecords(X) = "* " & tmptraining & " by: " & tmpInstructor & " " & tmpType
               
                If tmpRecords(0) ="" Then
                        x = 0
                Else
                        x = Ubound(tmpRecords) + 1
                End If
                Redim Preserve tmpRecords(x)
                tmpRecords(x)=doc.Records(0)
                doc.Records = tmpRecords
        End If     
        Call doc.RemoveItem("Type1")
        Call doc.RemoveItem("Training1")
        Call doc.RemoveItem("Instructor1")
        Call doc.RemoveItem("Input1")
        If doc.Save(False,False) Then
                uidoc.AutoReload = True
                Call uidoc.Reload
                Call uidoc.Refresh         
        End If     
End Sub

论坛徽章:
0
发表于 2007-01-08 09:58 |显示全部楼层

请教!

这网站上有高人吗? 怎么没有回帖的?

论坛徽章:
0
发表于 2007-01-08 19:28 |显示全部楼层
Designer里不是有现成的Lotus命令直接调用么。

论坛徽章:
0
发表于 2007-01-09 09:40 |显示全部楼层

Re: 请教!

不太明白,能不能给点提示! Designer里现成的Lotus命令调用是出错的。程序写入后,
运用doc.close出错,运用doc.save的话不保存文件时出错?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP