Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
GUI

Journal wift's Journal: stuff out of my clip board

%REM

Creates new legislative file version.
updateMM function will call this function
or call this function from Legislative File form.
%END REM
        On Error Goto mailerr
        Dim work As New notesuiworkspace
        Dim uidoc As notesuidocument
        Dim uidoc2 As notesuidocument
        Dim session As New NotesSession
        Dim doc As NotesDocument
        Dim doc2 As NotesDocument
        Dim db As NotesDatabase
        Dim viewlookup As NotesView

        Set db = session.CurrentDatabase

        loopbreak$ = Inputbox("You are about to create a new version of this file, would you like to continue? Y or N. ")
        If Ucase(loopbreak$) "Y" Then
                Messagebox ("New Version agent cancelled")
                Goto finish
        End If
        Set uidoc = work.CurrentDocument
        fversion = uidoc.fieldgettext("lf_version")

        uidoc.editmode = True

        Set doc = uidoc.Document
        doc.lf_version = fversion + 1
        Call doc.Save( True, True )

        Set doc2 = New NotesDocument( db )
        Call doc.CopyAllItems( doc2, True )
        doc2.revise_flag = Cstr( Now)
        doc2.lf_version = fversion
        Call doc2.Save( True, True )

        Exit Function

mailerr:
        Messagebox(ermessage7 )
        Call adminnotify("newversion")
        Resume finish
finish:
       

If you want to put yourself on the map, publish your own map.

Working...