Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Command0_Click()
'Outlook objects
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objContactFolder As Outlook.MAPIFolder
Dim objItems As Outlook.Items
Dim obj As Object
'ADO objects
Dim cnn As ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strFilter
'Set Outlook items
Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")
Set objContactFolder = objNS.GetDefaultFolder(11)
Set objItems = objContactFolder.Items
'Set connection
Set cnn = CurrentProject.Connection
'clear previous records
DoCmd.SetWarnings False
DoCmd.RunSQL "Delete * From table1"
DoCmd.SetWarnings True
'set string to relevant folder where items generating _
Journal items reside
strFilter = "M:\Net_RSI\MONITORING\Aberdeen Cyrenians"
'open rs
rs.Open "Table1", cnn, 3, 3
For Each obj In objItems
If Left(obj.Subject, Len(strFilter)) = strFilter Then
obj.NoAging = True ' set do not auto archive
obj.Save ' save
'Populate table
With rs
.AddNew
!JeDate = obj.Start
!JeDuration = obj.Duration
!JeSubject = obj.Subject
.Update
.Requery
End With
End If
Next obj
End Sub