eine andere Möglichkeit ist, die Schablone anzupassen und dann per Notes-Api die Gestaltung der neuen Schablone zu übernehmen.
Code
'(Declarations)Const wAPIModule = "NNOTES"Const NSF_INFO_SIZE = 128Const INFOPARSE_DESIGN = 3Const NOTE_ID_ICON = &HFFFF0010Declare Private Function DesignRefresh Lib wAPIModule Alias "DesignRefresh" (Byval S As String, Byval hDB As Long, Byval F As Long, Byval zA As Long, Byval zM As Long) As IntegerDeclare Private Function OSPathNetConstruct Lib wAPIModule Alias "OSPathNetConstruct" (Byval zP As Long, Byval S As String, Byval F As String, Byval N As String) As IntegerDeclare Private Function NSFDbInfoGet Lib wAPIModule Alias "NSFDbInfoGet" (Byval hDB As Long, Byval D As String) As IntegerDeclare Private Sub NSFDbInfoModify Lib wAPIModule Alias "NSFDbInfoModify" (Byval S As String, Byval W As Integer, Byval D As String)Declare Private Function NSFDbInfoSet Lib wAPIModule Alias "NSFDbInfoSet" (Byval hDB As Long, Byval D As String) As IntegerDeclare Private Function NSFDbOpen Lib wAPIModule Alias "NSFDbOpen" (Byval P As String, hDB As Long) As IntegerDeclare Private Function NSFDbClose Lib wAPIModule Alias "NSFDbClose" (Byval hDB As Long) As IntegerDeclare Private Function NSFItemSetText Lib wAPIModule Alias "NSFItemSetText" (Byval hNT As Long, Byval N As String, Byval D As String, Byval nD As Integer) As IntegerDeclare Private Function NSFNoteOpen Lib wAPIModule Alias "NSFNoteOpen" (Byval hDB As Long, Byval NoteID As Long, Byval F As Integer, hNT As Long) As IntegerDeclare Private Function NSFNoteClose Lib wAPIModule Alias "NSFNoteClose" (Byval hNT As Long) As IntegerDeclare Private Function NSFNoteUpdate Lib wAPIModule Alias "NSFNoteUpdate" (Byval hNT As Long, Byval F As Integer) As Integer
Code
Sub Click(Source As Button)
templateserver$ = "Dein Server"
templatename$ = "Dein pernames-Template"
dbserver$ = ""
dbfilepath$ = "names.nsf"
dp$ = String(1024, " ")
OSPathNetConstruct 0, dbserver$, dbfilepath$, dp$
Dim hDB As Long
NSFDbOpen dp$, hDB
If hDB = 0 Then Exit Sub
d$ = Space(NSF_INFO_SIZE)
NSFDbInfoGet hDB, d$
NSFDbInfoModify d$, INFOPARSE_DESIGN, templatename$
NSFDbInfoSet hDB, d$
Dim hNT As Long
NSFNoteOpen hDB, NOTE_ID_ICON, 0, hNT
NSFItemSetText hNT, "$TITLE", d$, Instr(d$, Chr$(0))
NSFNoteUpdate hNT, 0
NSFNoteClose hNT
DesignRefresh templateserver$, hDB, 1, 0, 0
NSFDbClose hDB
End Sub
Alles anzeigen
Gruß
Dirk