S
Simon Woods
Hi
I'm new to all this so bear with me
I've instantiated Outlook, pulled all the items in a particular journal into
a MAPIFolder called m_jnlBugs. I'm applying a filter to the items and want
to enumerate each item. The l_jnlItems seems to be returning the correct
number of Items. The For Each is returning a type mismatch. I've checked
other examples and the types seem to be the same --- what am I missing?
Thanks
Simon
[Outlook 9 OLB]
Sub MyFilter(Byval p_sCategory as String)
Dim l_jnlItems As Outlook.Items
Dim l_jnlItem As Outlook.JournalItem
Dim i As Long
InitialiseExcel
Set l_jnlItems = m_jnlBugs.Items.Restrict("[v5 Function] = '" &
p_sCategory & "'")
'Here we loop through all the items in the JournalFolder and
'collect the data per item
i = 1
For Each l_jnlItem In l_jnlItems
...
Next l_jnlItem
End Sub
I'm new to all this so bear with me
I've instantiated Outlook, pulled all the items in a particular journal into
a MAPIFolder called m_jnlBugs. I'm applying a filter to the items and want
to enumerate each item. The l_jnlItems seems to be returning the correct
number of Items. The For Each is returning a type mismatch. I've checked
other examples and the types seem to be the same --- what am I missing?
Thanks
Simon
[Outlook 9 OLB]
Sub MyFilter(Byval p_sCategory as String)
Dim l_jnlItems As Outlook.Items
Dim l_jnlItem As Outlook.JournalItem
Dim i As Long
InitialiseExcel
Set l_jnlItems = m_jnlBugs.Items.Restrict("[v5 Function] = '" &
p_sCategory & "'")
'Here we loop through all the items in the JournalFolder and
'collect the data per item
i = 1
For Each l_jnlItem In l_jnlItems
...
Next l_jnlItem
End Sub