Bonjour ,
on lotus script j'essaye d'ouvrire une autre base pour y copie le document courant
Mais je n'arrive pas a voir la valeur du serveur et de la base de donnée du masque profile ça donne la valeur vide à savoir que mon document profile est bien rempli.
docSettings.Server_Archives(0) et docSettings.Base_Archives(0)) sont vide
une idée ???
Sub Click(Source As Button)
Dim ses As NotesSession
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim sourceDoc As NotesDocument
Dim destinationDoc As NotesDocument
Dim db,dbArchive As NotesDatabase
Dim docSettings As NotesDocument
Dim doc As NotesDocument
'Dim sourceDatabase As New NotesDatabase("","source.nsf")
Set ses = New NotesSession
Set db = ses.CurrentDatabase
Set docSettings = db.GetProfileDocument("Settings")
If docsettings Is Nothing Then
Msgbox "There is no settings document. Please call the WebMaster."
Exit Sub
End If
Set dbArchive = New NotesDatabase(docSettings.Server_Archives(0),docSettings.Base_Archives(0))
If Not dbArchive.isOpen Then
Msgbox "Pb Base Archive"
Exit Sub
End If
'Set dbArchive= New NotesDatabase(docsettings.Server_Archives(0), docsettings.Base_Archives(0)) ' On ouvre un stub de base
'Dim destinationDatabase As New NotesDatabase("","destination.nsf")
'
Set uidoc = workspace.CurrentDocument
Set sourceDoc=uidoc.Document
Set destinationDoc = sourceDoc.CopyToDatabase(dbArchive)
'Set newNotesDocument = notesDocument.CopyToDatabase( notesDatabase )
'You can edit the document and save it if you wish as you know have a handle to the newly created document.
End Sub
Merci