View Single Post
  #2  
Old May 24th 07, 06:02 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook 2007 - Getting Note Body

I wouldn't expect to be able to use anything much with Notes and have it
work, they're brain dead and have been since Outlook 97. Just stick with the
normal exposed properties for a Note item and you should be OK. Trying to do
anything fancy with Notes is a waste of time.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"DanielLipkie" wrote in message
...
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").GetDefaul tFolder(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


Ads