function OpenWin(url, w, h) { if(!w) w = 400; if(!h) h = 300; window.open(url, "_new", "width=" + w + ",height=" + h + ",menubar=no,toobar=no,scrollbars=yes", true); } function Print() { window.focus(); if(window.print) { window.print(); window.setTimeout('window.close();',5000); } }
| Team-Fly | |
| Special Edition Using Microsoft® Visual Basic® .NET By Brian Siler, Jeff Spotts
| Table of Contents | | Part VI: Advanced Programming Topics |
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. |
| Team-Fly | |
|
| |
|