Outlook Notes delete

  • Thread starter Thread starter Roger Odermatt
  • Start date Start date
R

Roger Odermatt

Hello

How can delete all Notes in the Outlook?

I try it with this code, but no success.

------
Dim oApp As New Outlook.Application
Dim oNotes As Outlook.MAPIFolder
Dim oNameSpace As Outlook.NameSpace

oNameSpace = oApp.GetNamespace("MAPI")
oNotes = oNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderNotes)

Dim i As Integer

For i = 0 To oNotes.Items.Count - 1
oNotes.Items.Remove(i)
Next
------

Can anybody help me?

regards
Roger
 
Hi,

Try starting with the last note first.

Ken
--------------
Hello

How can delete all Notes in the Outlook?

I try it with this code, but no success.

------
Dim oApp As New Outlook.Application
Dim oNotes As Outlook.MAPIFolder
Dim oNameSpace As Outlook.NameSpace

oNameSpace = oApp.GetNamespace("MAPI")
oNotes = oNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderNotes)

Dim i As Integer

For i = 0 To oNotes.Items.Count - 1
oNotes.Items.Remove(i)
Next
------

Can anybody help me?

regards
Roger
 
Back
Top