Hi All,
I want to copy all the folders from outlook to hard disk except Drafts and Sent Items. The following code is copying all the folders. Please kindly tell me the way how can we avoid Drafts and Sent Items folders.
Thanks & RegardsSub GetFolder(Folders As Collection, EntryID As Collection, StoreID As Collection, Fld As MAPIFolder) Dim SubFolder As MAPIFolder Folders.Add Fld.FolderPath EntryID.Add Fld.EntryID StoreID.Add Fld.StoreID For Each SubFolder In Fld.Folders ' If Fld.Folders = "Sent items" Or "Drafts" Then ' Resume Next GetFolder Folders, EntryID, StoreID, SubFolder 'End If Next SubFolder ExitSub: Set SubFolder = Nothing End Sub
Ramesh
What happens which you check the NAME property of the folder eg
IF NOT Fld.Name = "Drafts" then
"do your magic"
end if
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks