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)
invoke method(#WordDoc.Bookmarks.item<'postcode'>.select)
use numeric_string #postcode #std_texts
invoke method(#WordApp.Selection.TypeText) text(#std_texts)
invoke method(#WordDoc.Bookmarks.item<'phonehme'>.select)
invoke method(#WordApp.Selection.TypeText) text(#phonehme)
invoke method(#WordDoc.Bookmarks.item<'phonebus'>.select)
invoke method(#WordApp.Selection.TypeText) text(#phonebus)
invoke method(#WordDoc.Bookmarks.item<'writernam'>.select)
invoke method(#WordApp.Selection.TypeText) text(#WordApp.UserName)
invoke method(#WordDoc.Bookmarks.item<'homepage'>.select)
invoke method(#WordApp.Selection.TypeText) text(www.lansa.com)
invoke method(#WordDoc.Bookmarks.item<'fulldate'>.select)
invoke method(#WordApp.Selection.TypeText) text(#datec)