| Hyderabad Jobs | Book Website | ![]() |
I Love Hyderabad | Hyderabad Colleges |
| Home | Business Emails | Hyderabad Classifieds | Contact Us | |
| 7 Wonders of Hyderabad | Web Hosting | Yellow Pages | Our Network | |
Mastering PowerBuilder
The PowerBuilder WindowThis example is the w_mail_merge_using_ole window in the OLE2-2.PBL library. If you open up the window, you'll see that it contains a DataWindow control containing the address information and just two CommandButtons. The code for the clicked event of the Mail Merge button is as follows:
When you run this example, it might take long time depending on the your computer and whether MS-Word is already open or not. In this example, we are introducting a new data type "ANY". This variable is used especially, when you don't know the return value of the OLE Server method. Later when you compare with any value, we need to explicitly convert the value as shown in the example. We define OLEMailMerge as an OLE object, connect to the Word document and then send the various server commands. The important lines are:
We are closing the document without saving it, so that when we loop around for the next address, we can reopen the document as a clean copy.
When you run this window and click on the Mail Merge button, you won't see much happening, but assuming your computer is connected to a printer, you should get two printed copies of our form letter, one for each of the addresses in our DataWindow.
|
| Copyright © 1996 - 2006 HamaraShehar.com Pvt. Ltd. All Rights Reserved.
Domain Registration, Website Design, Website Hosting by HamaraShehar.com |