Objective
Although most projects in the enterprise often interact with the backstage system through the custom interface and data carrier, there are still a large number of electronic document operations, including Word, in office automation and e-Government field. Unlike data-centric processing, such as Excel, Access, and InfoPath, Word focuses more on the actions of paragraph content and formatting in a story.
In practice, office automation development often faces the following challenges:
Office versions are updated quickly, but user group updates are relatively slow, and multiple versions are required in the project, but interface compatibility between different versions of Office products often breaks;
Stand-alone office software is prone to errors caused by malformed format, the process is not properly cleaned up can easily damage the document caused by the problem cannot be repaired;
Faced with the increasingly serious information security problems, many enterprise intranet security policies will disable Office macros, embedded scripts and client-side rendering processing;
Third-party Office middleware Technology Support Power is often unable to guarantee, especially the partial open source project its applicability is limited, and often has the "black box" by the design problem which cannot be bypassed, finally had to abandon this middleware and to tear down the whole redesign to redo.
But at the same time we also need to see the features of Word automated processing:
Word provides a template mechanism through which you can complete most chapter paragraphs and document style designs;
Although the original data types vary widely, the type used in the actual word operation is mainly string, and graphics, chart objects can be considered for integration with Visio or Excel;
The document data fill form is relatively fixed and is generally one or combination of the following three situations:
Operate a series of separate content areas;
Manipulate a table region;
Operate a single area.
In view of the above characteristics, it is necessary to design the local architecture for the convenience of the developer to access the Word document.
Define Bookmarks
But before that, in order to simplify word programming, this framework accesses and operates word for a bookmark by defining the following methods:
1, open Word file, select Show Bookmark
2, select the location, and then insert the bookmark. For a table area that requires action, you can select the entire range and insert the bookmark.