Manage Learn to apply best practices and optimize your operations.

Export contact details to Word

Create a button on the contact form of names.nsf with the following code. It will launch Word/import the names and address of the contacts in your Word doc in less than a second.

You can create a button on the contact form of names.nsf with the following code. It will launch Word and import the names and address of the contacts in your Word document in less than a second. It is much better than pasting the individual fields in.

  Sub Click(Source As Button)
 Dim wordobj As Variant
 Dim FirstName As Variant
 Dim LastName As Variant
 Dim OfficeStreetAddress As Variant
 Dim OfficeCity As Variant
 Dim OfficeState As Variant
 Dim OfficeZip As Variant
 Dim OfficeCountry As Variant
 Set wordobj = CreateObject("word.basic.8")
 Dim workspace As New NotesUIWorkspace
 Dim uidoc As NotesUIDocument
 Set uidoc = workspace.CurrentDocument
 wordobj.insert FirstName & " " &  
LastName &Chr(10)
 wordobj.insert Cno & Chr(10)
 wordobj.insert OfficeStreetAddress & Chr(10)
 wordobj.insert OfficeCity & Chr(10)
 wordobj.insert OfficeState & Chr(10)
 wordobj.insert OfficeZip & Chr(10)
 wordobj.insert OfficeCountry & Chr(10)
End Sub

Do you have comments on this tip? Let us know.

This tip was submitted to the tip exchange by member Sarah Hammond. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

Dig Deeper on LotusScript

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...