Chapter 25. Interacting with Other Applications

In This Chapter

Remote-Controlling Microsoft Excel

Remote Controlling Microsoft Word

Using the SmtpMail Class to Add E-mail Functionality to an Application

From Here…

With a little bit of programming, a Visual Basic .NET program can be made to control other applications that are installed on your computer, such as members of the Microsoft Office suite. This method of working “outside the box” lets you use Visual Basic to create incredibly useful tools that harness the existing power provided by these other programs. For example, if you would like to include Microsoft Excel functionality in a VB program, you can have your program automatically start Excel itself, acting as a remote control to drive the Excel application.

In this chapter, we will demonstrate how to create Visual Basic .NET applications that interact with both Microsoft Excel and Microsoft Word. As an added bonus, you will see how to use Visual Basic .NET’s SmtpMail class to have your applications automatically send e-mail messages.

Note

In order for a Visual Basic .NET application to be able to control another program, that other program must be installed on the user’s computer. It would be a good idea to include some error handling code to ensure that the target application does not fail to start up.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.208.200