The invention discloses an official document intelligent typesetting method which comprises the following steps: detecting whether the number of paragraphs of a document meets the minimum
paragraph requirement of the official document or not, performing feature analysis on the content of the document
paragraph by
paragraph, generating an official document structure tree according to an analysis result, and scanning the text content of each paragraph in the official document structure tree according to the format requirement. And detecting parts which do not meet the
document format requirements, carrying out conditional
processing, setting termination words, and judging the termination words until the termination words meet the
document format requirements. According to the method, personalized customization of the official document is achieved, meanwhile, simpler, lighter and more efficient automatic typesetting is achieved during official document editing, and the official document typesetting efficiency of an enterprise is remarkably improved. According to the device provided by the invention, the VSTO operation support
library is automatically installed according to a
software environment, and the VSTO operation support
library is automatically registered as an expansion plug-in of Word or WPS, so that the use threshold of workers is reduced, and the overall working efficiency of the workers is improved while better use experience is brought.