编辑后创建两个保存选项

Create two save options after editting

我想创建两个保存选项按钮。我有一个手动保存的版本跟踪选项。我创建了一个保存选项,它将在不添加版本的情况下保存。因此,要添加版本,我需要单击 "File > Save As New Version"。

手动保存,有个选项需要点击"Save As New Version"。

所以,我想添加另一个保存按钮,当用户点击它时,它会保存为新版本。所以我不必点击 "File > Save As New Version".

下面是我没有另存为新版本的存档。

Sub Click(Source As Button)
    Dim session As New NotesSession
    Dim workspace As New NotesUIWorkspace
    Dim db As NotesDatabase
    Dim uidoc As NotesUIDocument
    Dim doc As NotesDocument

    Set uidoc = workspace.CurrentDocument
    Set db = session.CurrentDatabase
    vpswd = Inputbox$("Pls input code to save :")

    If vpswd = "o" Then

        uidoc.EditMode = True
'       Call uidoc.FieldSetText("ALStatus" , "Draft")
        Call uidoc.FieldSetText("SaveOptions" , "1")
        Call uidoc.Save
'       uidoc.EditMode = False
        Call uidoc.Close
    End If
End Sub

如何实现为"Save As New Version"创建一个LotusScript?

NotesUIDocument class 有一个 SaveNewVersion 方法,因此您应该能够从现有按钮复制代码,然后只需更改副本中的这一行:

 Call uidoc.Save

对此:

 Call uidoc.SaveNewVersion

通过查看 Notes 客户端附带的帮助,我花了大约 5 分钟才解决这个问题。你应该也能做到。