Access.2007.VBA.Bibl..

(John Hannent) #1
Figure 8.23 shows one of the appointments created by the procedure.

FIGURE 8.23

A project meeting appointment created from data in an Access table.


Working with Outlook Tasks ............................................................................................


As with appointments, if you have an Access table of tasks created many Office versions ago, I rec-
ommend exporting the task data to Outlook, so it can be maintained in the Task List (in Outlook
2007, renamed the To Do List) for future use.

The table that I imported from the sample Tasks database (tblTasks) to Outlook tasks can be used
as an example of how to export Access task data to Outlook. The following function does the
export (it can also be run from the mcrExportTasksToOutlook macro):

Public Function ExportTasksToOutlook()

On Error GoTo ErrorHandler

Dim fldTasks As Outlook.Folder
Dim tsk As Outlook.TaskItem
Dim strTaskName As String
Dim dteStartDate As Date
Dim dteDueDate As Date
Dim strStatus As String
Dim lngStatus As Long

Working with Outlook Items 8

Free download pdf