Delphi Actions Word's Knowledge Point

xiaoxiao2021-03-05  24

//-------------------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 ----------

转载请注明原文地址:https://www.9cbs.com/read-38828.html

New Post(0)