Import Outlook Task Form Data Into Access



I have several public task folders from which I would like to import the task information into Access including some form data. I've tried the table linking deal but it doesn't include the start date and other form data. I know the EntryIDs and StoreIDs but can't figure out how to make it import. Any ideas? Here's my current code:


' Set up DAO objects (uses existing "tblTasks" table)
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("tblTasks")


' Set up Outlook objects.
Dim ol As New Outlook.Application
Dim olns As Outlook.NameSpace
Dim cf As Outlook.MAPIFolder
Dim c As Outlook.TaskItem
Dim objItems As Outlook.Items
Dim Prop As Outlook.UserProperty
Dim txtEntryID, txtStoreID

txtEntryID = Screen.ActiveForm.ENTRYID
txtStoreID = Screen.ActiveForm.STOREID

Set olns = ol.GetNamespace("MAPI")
Set cf = olns.GetFolderFromID(txtEntryID, txtStoreID)
Set objItems = cf.Items
iNumTasks = objItems.Count
If iNumTasks <> 0 Then
For i = 1 To iNumTasks
If TypeName(objItems(i)) = "TaskItem" Then
Set c = objItems(i)
rst.AddNew
rst!TASK = c.Subject
rst!DueDate = c.DueDate
rst!STARTDATE = c.STARTDATE
rst!Status = c.Status
rst!Rec = c.IsRecurring
rst!SECTION = Screen.ActiveForm.DutySection
rst!Remarks = c.Body
rst.Update
End If
Next i
rst.Close
End If

After the last rst! I would like to add a reference to a field on a custom tab: (There's the 'TASK' tab and 'MY TAB')

rst!EQUIPID = c.MyCustomTab.EQUIPID (or whatever will work)

Any ideas?
.



Relevant Pages

  • Import Outlook Task Form Data Into Access
    ... I have several public task folders from which I would like to import the task information into Access including some form data. ... Dim ol As New Outlook.Application ... If iNumTasks 0 Then ... I would like to add a reference to a field on a custom tab: ...
    (microsoft.public.outlook.program_vba)
  • Re: Import Outlook Task Form Data Into Access
    ... task information into Access including some form data. ... linking deal but it doesn't include the start date and other form data. ... Dim ol As New Outlook.Application ... tab: ...
    (microsoft.public.outlook)
  • RE: Pass result of query to VBA as boolean
    ... The form data is used to pass data to a query. ... Dim blnIsNegative as Boolean ... Dim prm As DAO.Parameter ... I need to validate some form data before modifying several tables. ...
    (microsoft.public.access.queries)
  • RE: HttpWebRequest
    ... I think that there is no problem in your .NET code. ... asp page can't get form data. ... > Dim req As HttpWebRequest ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Open IWebBrowser via vbscript?
    ... > Having trouble getting my app to run the .vbs file. ... Dim ie ... Form Data" for a VB example. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)

Loading