'GenerateXMLSelected: Option Public Option Declare Sub Initialize 'Created May 3, 2008 by Ted Hardenburgh ' 'No warranty or other guaranty provided, Your mileage may vary, and "It worked for me!" all apply. :) ' 'Creates XML file to be used for creating Quickr Entry places for selected people in the current database 'Copy this agent into your Domino Directory to run against selected documents. This agent expects to be run from inside the Domino Directory 'Sorry for the hardcoding, but you will need to provide the name of the Quickr server in the parameter 'or you can change it in the XML file that is generated. Dim session As New NotesSession Dim db As NotesDatabase Dim view As NotesView Dim viewnav As NotesViewNavigator Dim viewentry As NotesViewEntry Dim dc As NotesDocumentCollection Dim doc As NotesDocument Dim fileNum As Integer Dim filename As String Dim email As notesitem Set db = session.CurrentDatabase Set dc = db.UnprocessedDocuments fileNum% = Freefile() fileName$ = "c:\temp\quickrentry.xml" Open fileName$ For Output As fileNum% Print #filenum%, "" Print #fileNum%, "" Print #fileNum%, "" Print #fileNum%, "" Print #fileNum%, "" Print #fileNum%, "server.domain.com" 'Change the server name to the FQDN of the Quickr server Print #fileNum%, "" Set doc = dc.GetFirstDocument While Not (doc Is Nothing) If (doc.HasItem("InternetAddress") ) Then Set email = doc.GetFirstItem("InternetAddress") If ( email.text <> "") Then Print #fileNum%, "" Print #fileNum%, "" & doc.GetFirstItem("InternetAddress").text & "" Print #fileNum%, "" End If End If Set doc = dc.GetNextDocument(doc) Wend Print #fileNum%, "" Print #fileNum%, "" Print #fileNum%, "" Print #fileNum%, "" Close fileNum% End Sub