Page History
...
*
*Enable and show controls in the Data for New Document group box
set com(#gpbx_3 #labl_2) enabled(true)
execute infmessage 'A new document has been opened.'
*Update the list of documents
execute doclist
*disable the Add Document button until the employee information has been inserted
set #addbtn enabled(false)
ENDROUTINE
*Add employee information to the document
EVTROUTINE HANDLING(#ltvw_1.DoubleClick)
*Concatenate first name and surname to get #Fullname
Use BConcat (#GiveName #SurName) (#FullName)
*Locate the Word bookmark 'fullname' in the document
invoke method(#WordDoc.Bookmarks.item<'fullname'>.select)
*Insert the value of the #fullname field
invoke method(#WordApp.Selection.TypeText) text(#fullname)
invoke method(#WordDoc.Bookmarks.item<'address1'>.select)
invoke method(#WordApp.Selection.TypeText) text(#address1)
invoke method(#WordDoc.Bookmarks.item<'address2'>.select)
invoke method(#WordApp.Selection.TypeText) text(#address2)
invoke method(#WordDoc.Bookmarks.item<'address3'>.select)
invoke method(#WordApp.Selection.TypeText) text(#address3)