ponkrot.blogg.se

Visual basic for applications outlook
Visual basic for applications outlook









It can represent either a one-time or recurring appointment or meeting.

visual basic for applications outlook

These objects and their descriptions are summarized in Table B. The fundamental objects in Outlook include mail messages, appointments, tasks, contacts, journal entries, posts, mail delivery reports, remote mail items, and notes, among others.

visual basic for applications outlook

The storage area into which all objects are moved when they are marked for deletion The container for AppointmentItem objects The storage area into which copies of user-generated MailItem objects are moved when they are sent

visual basic for applications outlook

The storage area for items that are completed but not sent yet Table A shows the default folders that are created when you open Outlook for the first time. You use the Add method to add the folder to the Folders collection. When manipulating Outlook’s folders, remember that the folder names are case-sensitive. Outlook allows you to add folders, add contents to folders, and move and copy items from one folder to another. The Inspector object represents the window in which an Outlook item is displayed, and the Explorer item represents the window in which the contents of the folder are displayed. The Items collection contains all the Outlook items in a specified folder. The Count property of the Items collection returns 0 when there are no items in a folder. The Items collection of a MAPIFolder object contains the objects that represent all Outlook items in a specified folder. The Folders collection contains all the MAPIFolder objects in the specified message store. The NameSpace object allows logging in and out of Outlook, returning objects by ID and returning default folders, and gaining access to the data sources owned by other users. The NameSpace object represents a data source, such as MAPI message store. The Application object is the only object in Outlook that can be returned by using CreateObject or GetObject. The Application object’s CreateItem method allows creating new items and gives you access to Explorer and Inspector objects that represent the Outlook interface. The Application object provides access to all the other objects in Outlook’s object model. An Explorer object is associated with each folder and an Inspector object is associated with each object. These MAPIFolder objects contain other objects that represent the items in the data source. The NameSpace object contains MAPIFolder objects that represent all folders in a given data source. This is the root object that contains the NameSpace object. The Outlook 2000 object model includes a global Application object.

visual basic for applications outlook

Then, we’ll create a sample VB app to see they fit together. In this article, we’ll examine the object model and look at the objects and events that Outlook items support. Or you might design it to notify management whenever the status of the project changes.Īutomating Outlook is easy once you understand Outlook’s object model. For example, an application for gathering project information might use VB with Outlook to send e-mail notification to all people involved with the project. Given the popularity of Outlook in today’s work environment, Visual Basic developers are likely to be called upon to automate various functions, such as sending e-mails, creating tasks and notes, adding people to contact lists, and performing other tasks. These steps guide you through the process. It's easy when you use Outlook and Visual Basic. Nothing like having your app generate automated e-mail notices to impress people.











Visual basic for applications outlook