G
Guest
With Access & Outlook 2003 I had Access code that read through the Notes
folder with
Dim fldFolder As Outlook.MAPIFolder
Dim objItems As Items
Dim objItem As Object
Dim oNoteItem as As Outlook.NoteItem
Set fldFolder =
Outlook.Application.GetNamespace("MAPI").GetDefaultFolder(olFolderNotes)
Set objItems = fldFolder.Items
objItems.Sort "Subject"
For Each objItem In objItems
Set oNoteItem = objItem
<... then code to use oNoteItem.Body, oNoteItem.Subject>
But this same code fails on the fldFolder.Items with Access/Outlook 2007.
Run-time error 80040155, Method "Items' of object MAPIFolder failed.
What is the correct coding style for accessing/modify Notes with 2007. A
pointer to Knowledge base article would be appreciated. I've trying replacing
the above style with using the new Table object but can't find a way to get a
"Body" column. The default columns contain only Subject. Columns.RemoveAll
followed by Columns.Add ("Body") fails.
Hints, pointers to overviews on handling issues of Access/Outlook 2003->2007
vba conversion would be appreciated.
Daniel
folder with
Dim fldFolder As Outlook.MAPIFolder
Dim objItems As Items
Dim objItem As Object
Dim oNoteItem as As Outlook.NoteItem
Set fldFolder =
Outlook.Application.GetNamespace("MAPI").GetDefaultFolder(olFolderNotes)
Set objItems = fldFolder.Items
objItems.Sort "Subject"
For Each objItem In objItems
Set oNoteItem = objItem
<... then code to use oNoteItem.Body, oNoteItem.Subject>
But this same code fails on the fldFolder.Items with Access/Outlook 2007.
Run-time error 80040155, Method "Items' of object MAPIFolder failed.
What is the correct coding style for accessing/modify Notes with 2007. A
pointer to Knowledge base article would be appreciated. I've trying replacing
the above style with using the new Table object but can't find a way to get a
"Body" column. The default columns contain only Subject. Columns.RemoveAll
followed by Columns.Add ("Body") fails.
Hints, pointers to overviews on handling issues of Access/Outlook 2003->2007
vba conversion would be appreciated.
Daniel