//-------------------initialization--------------------
Var Wapping, Work: Variant;
Try wapp: = getActiveoleObject ('Word.Application'); Except Wapp: = CreateoleObject ('Word.Application'); END;
// --------------- Replace characters --------------------
Wapp.selection.find.text: = '<% a2%>'; wapp.selection.find.replacement.text: = lb; wapp.selection.find.execute (Replace: = WDREPLACEAll);
// ---------------------- Hide Word Menu and Toolbar -------------------- -
If Oc.State In [osuiactive] the beginning.quryinterface (IOleinPlaceObject, IOO); IOO.UIDEACTIVATE; IOO: = NIL;
// ----------------- According to the book signage ------
Wapp.seection.goto (what: = wdgotobookmark, name: = 'zczd' INTOSTR (i)); wapp.seext ('■')
// ------------------ generate the header footage and write data ----------