eazycas.blogg.se

How to create a task in outlook
How to create a task in outlook










how to create a task in outlook

' Display the new task form so the user can fill it out Set NewTask = objOLApp.CreateItem(olTaskItem) ' You can only use CreateItem for default items Once you have set an object variable to reference the folder that contains the items you wish to work with, you use appropriate code to accomplish your task, as shown in the following example. Set objFolder = objNS.GetDefaultFolder(olFolderContacts) After you set an object variable to the Outlook Application object, you will commonly set a Namespace object to refer to MAPI, as shown in the following example. Outlook stores all of its information in Messaging Application Programming Interface (MAPI) folders. Most programming solutions interact with the data stored in Outlook. You can then use the following syntax to start an Outlook session. To use early binding, you first need to set a reference to the Outlook object library. Set objOL = CreateObject("Outlook.Application") All automation code must first define an Outlook Application object to be able to access any other Outlook objects. For example, the following code sets an object variable to the Outlook Application object, which is the highest-level object in the Outlook object model. Late binding uses either the GetObject or the CreateObject function to initialize Outlook.

how to create a task in outlook

To start an Outlook automation session, you can use either early or late binding.












How to create a task in outlook