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.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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 Cno=uidoc.FieldGetText("CompanyName") FirstName=uidoc.FieldGetText("FirstName") LastName=uidoc.FieldGetText("LastName") OfficeStreetAddress=uidoc.FieldGetText ("OfficeStreetAddress") OfficeCity=uidoc.FieldGetText("OfficeCity") OfficeState=uidoc.FieldGetText("OfficeState") OfficeZip=uidoc.FieldGetText("OfficeZip") OfficeCountry=uidoc.FieldGetText("OfficeCountry") wordobj.filenew 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) wordObj.AppShow End Sub
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com 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.