Put this code in a viewaction and select some documents. After clicking the
button the scripts askes you for an filename and creates a mailmerge record in
this file for each selected doc.
You can than use the file created in MS-Word as a mailmergefile.
Ard van Leeuwen
My Way Solutions
Set session = New NotesSession
fhandle% = Freefile()
file =Inputbox("Naam van het te maken merge bestand", "Bestandsnaam")
If (file="") Then
filedir="C:\temp\Mergebestanden\" + file + ".doc"
Open filedir For Output As fhandle%
Print #fhandle%, "mergefieldcode1";Chr(9); "mergefieldcode2"; Chr(9)
Set db = session.currentdatabase
Set col = db.UnprocessedDocuments
'Only the selected docs are merged
Set doc = col.GetFirstDocument()
While Not(Doc Is Nothing)
Print #fhandle%, doc.NotesField1(0)+Chr(9),
Set doc = col.GetNextDocument(doc)