Category Archive for: OLE Automation and VBA

Automating Outlook 98

Incorporating e-mail capabilities into Desktop applications is becoming increasingly popular in today’s software. To make your applications e-mail-aware, you can ,use the .MAP! control or program Outlook’s objects. We are going to discuss how to mail enable your Visual Basic applications through the Outlook VBA because Outlook is simple, manages fore types of information than just messages, and it’s…

Read More →

Using Excel as a Math Parser

In the earlier section “Spell-Checking Documents,” you learned how to borrow the spell-checking capabilities of Word, Now, we’ll do something similar with Excel. Excel is a great tool for doing math. At the same time, Visual Basic doesn’t provide a function or method for calculating math expressions. If Excel is installed on the host computer, you can contact it…

Read More →

Automating Excel

The objects that Excel exposes have different names, but they form an equally sensible and structured hierarchy for accessing data stored in a-tabular arrangement. Just as Word’s basic unit of information is the text segment (not characters or words), Excel’s basic unit of information is-also called Range. A Range object can contain a single cell or an entire worksheet…

Read More →

VB6 at Work: The AutoMssg Project

The AutoMssg.application demonstrates how to create e-mail messages from within your Visual Basic applications and use Outlook to deliver them. It also shows another technique for retrieving and organizing contacts. Initially, the application retrieves the names of the companies only and djsplays them in’ the Comp~es list. The user can select a company and see the contacts in this…

Read More →

Automating Word

Microsoft Word provides numerous objects which you can use to program any action that can be carried out with menu commands. For example, you can open a document, count words and characters, replace certain words in it, and save it back on disk without user intervention. You can actually do all this in background with even displaying Word’s window…

Read More →

The Application’s Code

In the Form’s Load event we create two object variables, the OLApp variable, which references the Outlook application, and the mNameSpace variable, which references. Outlook’s folders. These variables are declared in the Form’s declaration section with: the following statements: Dim OLApp As Application Dim mNameSpace As NameSpace Then, the code sets up the AIlContacts variable, which references…

Read More →

Retrieving Information

Outlook stores different types of information in different files. Contact information is stored in the Contacts file, incoming messages are stored in the InBox folder, and so on. Most users, however, customize Outlook’s folder structure by adding subfolders to the default folders. To organize your contacts, for’instance, you can create Business and Personal subfolders under the Contacts folders.…

Read More →

OLE Automation

OLE Automation goes one step beyond linking. When you link, you borrow the functionality of another application. When you use OLE Automation, you control the source document from within your application. Applications that support OLE Automation expose their objects to other applications. For example, an object that Word exposes could be a sentence, a paragraph, or an entire document.…

Read More →

Programming OLE Drag-and-Drop Operations

Manual OLE drag-and-drop operations are more flexible than automatic operations because your program is in control. The OLEDDMAN project (also in the OLEDD folder on the CD) has the same interface as the OLEDDAUTO project, but it uses the ‘manual setting of the OLEDropMode property. The TextBox’s OLEDragMode property is set to Automatic, so no code is needed to…

Read More →

OLE Drag-and-Drop Operations

You learned how to program drag-and-drop operations. Drag-and drop operations allow the user to drag a control on a Form and drop it on another control (which may reside on the same or another Form). The destination control knows when another control is dropped and can be programmed to react to this action. However; you must supply some code…

Read More →

Back to Top