Automating Microsoft Office Word in Visual Basic

Hongqi Gong, Lihua Li, Guangyong Sun, Hongyu Zhao · 2009

With its worldwide popularity, Microsoft Word has become the leading word-processing program on earth. Microsoft Word, like the other components in the Microsoft Office suite, provides an abundant set of ActiveX controls that can be utilized in most programming languages. The five chief ActiveX controls from the Microsoft Word object library are Application, Windows, Documents, Selection and Range. Methods and properties of those objects form the base stone of Word automation. A sample Visual Basic program exemplifies the automation of routine procedures, such as starting Word, adding, saving and closing documents, copying and pasting text. Familiarity with ActiveX controls from Microsoft Word will effectively boost the efficiency of office work.

Read the paper · More papers on PaperTik