Remote Controlling Microsoft Word

Just like Excel, Microsoft Word exposes a set of COM objects that can be utilized by other programs to drive a session of Word. Again, this object library, which will be accessed via a .NET wrapper around the COM component, will allow a program to control Word just like a user sitting at a keyboard.

Adding a Reference to the Word Object Library

As with Excel, in order for an application to be able to interact with Microsoft Word, you must first add a reference to the Word object library to your application. Again, you will do so by creating a .NET wrapper around the Word COM component. Follow these steps to begin enhancing the sample application for Word interactivity:

1.
Begin with the ControlOfficeDemo ...

Get Special Edition Using Microsoft® Visual Basic® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.