| Dim session As notessession |
| Dim ws As notesuiworkspace |
| Dim this_db As notesdatabase |
| Dim par_view As notesview |
| Dim prof_dc As notesdocumentcollection |
| Dim this_ui_doc As notesuidocument |
| Dim par_doc As notesdocument |
| Dim prof_doc As notesdocument |
| Dim this_doc As notesdocument |
| Dim prof_rt_item As Variant |
| Dim flag As Variant |
| |
| Dim server As String |
| Dim bk_datenbank As String |
| |
| ' |
| |
| Set session = New notessession |
| Set ws = New notesuiworkspace |
| Set this_db = session.currentdatabase |
| Set par_view = this_db.getview ( "Parameter" ) |
| |
| Set this_ui_doc = ws.currentdocument |
| Set this_doc = this_ui_doc.document |
| |
| flag = False |
| |
| Call this_doc.save (True,True) |
| |
| Set prof_rt_item = this_doc.getfirstitem ( "BerechtigungProfilRT" ) |
| |
| If Not par_view Is Nothing Then |
| Set par_doc = par_view.getdocumentbykey("Berechtigungskonzept") |
| Else |
| Msgbox "Ansicht Parameter nicht gefunden!",16,"Fehler" |
| Exit Sub |
| End If |
| |
| If Not par_doc Is Nothing Then |
| server = this_db.server |
| bk_datenbank = par_doc.ParameterWertTX (0) |
| Else |
| Msgbox "Parameter >Berechtigungskonzept< nicht gefunden!",16,"Fehler" |
| Exit Sub |
| End If |
| |
| Set prof_dc = ws.picklistcollection ( PICKLIST_CUSTOM, False, server, bk_datenbank, "BerechtigungsprofileAktuell", "Profilauswahl", "Bitte wählen Sie ein Profil aus!") |
| |
| Set prof_doc = prof_dc.getfirstdocument |
| |
| If prof_rt_item.type = RICHTEXT Then |
| flag = prof_doc.rendertoitem ( prof_rt_item ) |
| If flag = True Then |
| Call this_doc.save (True,True) |
| Else |
| Msgbox "Profil konnte nicht eingefügt werden!",16,"Fehler" |
| End If |
| End If |