.Update
End With
End If
Next itm
rst.Close
DoCmd.OpenTable “tblImportedTasks”
ErrorHandlerExit:
Exit Function
ErrorHandler:
Outlook is not running; open Outlook with CreateObject.
If Err.Number = 429 Then
Set appOutlook = CreateObject(“Outlook.Application”)
Resume Next
Else
MsgBox “Error No: “ & Err.Number _
& “; Description: “ & Err.Description
Resume ErrorHandlerExit
End If
End Function
Figure 8.25 shows the table of imported tasks.
FIGURE 8.25
A table of tasks imported from Outlook.
Part II Writing VBA Code to Exchange Data between Office Components