How to copy only the changed and new journal items?

M

MIchael

Hello
careful Iam beginner ;-))
I copy journaled items from a private to a public journal folder.
Is ist possible to copy only the changed and new items?
How?
Thanks very much for your help
MIchael

Code:

Dim myOlApp
Dim myNamespace
Dim myFolder
Dim myFolder2Parent
Dim myFolder2
Dim myJournalItems
Dim myitem2copy
Dim myCopiedItem

Set myOlApp = CreateObject("Outlook.Application")
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myFolder = myNamespace.GetDefaultFolder(olFolderJournal)
Set myFolder2Parent = myNamespace.Folders("Öffentliche Ordner")
Set myFolder2Parent = myFolder2Parent.Folders("Alle Öffentlichen Ordner")
Set myFolder2 = myFolder2Parent.Folders("AS-DA2-Journal")
Set myJournalItems = myFolder.Items

For Each myitem2copy In myJournalItems
If myitem2copy.Sensitivity = 0 Then
Set myCopiedItem = myitem2copy.Copy
myCopiedItem.Move myFolder2
myitem2copy.Delete
End If
Next
 
M

Michael Bauer [MVP - Outlook]

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top