HiIf a select a document in a view and want all info in one richtext field and one textfield in that document will be copied to a new document when a press a button. How will a do that?
It works with textfield in @Formula but not with the richtextfield.
I understand that i must use LS for this or…
I tried but it will not work, are there any who could put me in right direction. I’m a newbie in LS.
=====
Sub Initialize
Dim session As New notessession
Dim ws As New NotesUIWorkspace
Dim dbThis As NotesDatabase
Dim dbDB As NotesDatabase
Dim path As String
Dim server As String
Dim uiDoc As NotesUIDocument
Dim doc As NotesDocument
Dim dbDoc As NotesDocument
Dim profileDoc As NotesDocument
Dim item As NotesItem
Set uiDoc = ws.CurrentDocument
Set doc = uiDoc.Document
Set dbThis = session.CurrentDatabase
server = dbthis.Server
’ open database
Set profileDoc = dbThis.GetProfileDocument(“ProfileDocument”)
path = profileDoc.pathDB(0)
Set dbDB = session.GetDatabase( server, path)
If Not dbDB.isopen Then
Messagebox “Databasen could not be open”,0+16,“ERROR!”
Exit Sub
End If
’ create document in db and set fieldvalues
Set dbDoc = dbDB.Createdocument
dbDoc.Besk = doc.Besk
Set item = doc.GetFirstItem(“Tools”)
Call dbDoc.CopyItem( item,“” )
dbDoc.form= “Document”
Call ws.EditDocument(True, dbDoc,)
End Sub
=====
Excuse my poor english,
Kind regards
Fredrik