Hallo Forum,
ich bin etwas ratlos, warum wird die Messagebox nicht so wie gewünscht öffnet. Sie kommt nur mit dem Button OK?
Hier der code:
In View Declarations:
%INCLUDE "lsconst.lss"
Als Button in der View:
Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim dbthis As NotesDatabase
Dim dc As NotesDocumentCollection
Dim datadoc As NotesDocument
Dim item As NotesItem
Set dbthis = session.CurrentDatabase
Set dc = dbthis.UnprocessedDocuments
Dim boxType As Long, answer As Integer
boxType& = MB_YESNO + MB_ICONQUESTIO
answer% = Messagebox ( "mit heutigem Datum" , boxType& , "Bitte auswählen!" )
Messagebox answer%
If dc.Count > 0 Then
Set datadoc = dc.getFirstDocument
While Not datadoc Is Nothing
Set notesDateTime = New NotesDateTime( "Today" )
Set item = datadoc.ReplaceItemValue( "Datum", notesDateTime )
Set item = datadoc.ReplaceItemValue( "Gültigkeit", "freigegeben" )
Call datadoc.Save( True, True )
Set datadoc = dc.GetNextDocument(datadoc)
Wend
End If
Call workspace.ViewRefresh
End Sub