Bonjour,
je voudrais envoyer un mail a chaque utilisateur avec un lien qui appliquerait le modèle souhaité sur leur base de courrier.
Pourriez vous me dire si cela est réalisable ou non, et si c'est le cas comment faire.
Merci
Function ReplaceDesign(Byval templateServer As String, Byval templateDB As String, Byval targetServer As String, Byval targetDB As String, Byval Createifneed As Variant) As Variant
ReplaceDesign = False
If templateServer = "" Then
status = apiNSFDbOpen(templateDB, htemplate)
Else
status = apiNSFDbOpen(templateServer & "!!" & templateDB, htemplate)
End If
If status<>0 Then
Print "Can't open template."
Exit Function
End If
If targetServer = "" Then
status = apiNSFDbOpen(targetDB, htarget)
Else
status = apiNSFDbOpen(targetServer & "!!" & targetDB, htarget)
End If
If staus<>0 And Createifneed Then
Print "Can't open database. Creating new."
If targetServer = "" Then
Call apiNSFDbCreate(targetDB, DBCLASS_BY_EXTENSION, True)
status = apiNSFDbOpen(targetDB, htarget)
Else
Call apiNSFDbCreate(targetServer & "!!" & targetDB, DBCLASS_BY_EXTENSION, True)
status = apiNSFDbOpen(targetServer & "!!" & targetDB, htarget)
End If
End If
If status<>0 Then
Print "Can't open database."
Call apiNSFDbClose(htemplate)
Exit Function
End If
Call apiDesignReplace(htemplate, htarget, 1, 1, 0, 0)
ReplaceDesign = True
Call apiNSFDbClose(htemplate)
Call apiNSFDbClose(htarget)
End Function
Michael DELIQUE a écrit:@Pivot, ton code est bien mais il manque les déclaration des api
des tips sur le sujet
=> http://forum.dominoarea.org/refreshdesign-t12286.html
=> http://forum.dominoarea.org/replacedesign-t12285.html
Michael DELIQUE a écrit:désolé, mais les api notes doivent être déclaré
c'est que tu dois avoir une bibliotheque de script qui les déclare
Const DBCLASS_BY_EXTENSION = 0
Declare Function apiNSFDbOpen Lib "nnotes.dll" Alias "NSFDbOpen" (Byval filename As String, hDB As Long) As Integer
Declare Function apiNSFDbClose Lib "nnotes.dll" Alias "NSFDbClose" (Byval hDB As Long) As Integer
Declare Function apiDesignReplace Lib "nnotes.dll" Alias "DesignReplace"_
(Byval ht As Long, Byval hDB As Long, Byval dw1 As Long, Byval dw2 As Long, Byval dw3 As Long, Byval dw4 As Long) As Integer
Declare Function apiNSFDbCreate Lib "nnotes.dll" Alias "NSFDbCreate" (Byval PathName As String, Byval DbClass As Integer, Byval ForceCreation As Integer) As Integer
Dim source As String
Dim target As String
Dim htemplate As Long
Dim htarget As Long
Dim status As Integerelgoe a écrit:Pourquoi tu fait pas un load convert avec un fichier teste en entree tout simplement