v_gyku
10-20-2005, 06:23 AM
I am writing code to redirect mails from perticular EmailAddress.
For that i am giving user a form in which all the folders in outlook will be listed.
I am not getting the code to do this.
I can do this if i want to list folders from perticular folder like inbox by this :
Set myOlApp = CreateObject("Outlook.Application")
Set name = myOlApp.GetNamespace("MAPI")
Set fldFolder = name.Folders("olinbox")
'For Each prfolder In fldFolder
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Call GetFolderInfo(fldFolder)
GetFolderInfo is listing folders in fldfolder.
But i want to check for all folders in outlook.(like folders in outbox, inbox....)
How can i list them?
For that i am giving user a form in which all the folders in outlook will be listed.
I am not getting the code to do this.
I can do this if i want to list folders from perticular folder like inbox by this :
Set myOlApp = CreateObject("Outlook.Application")
Set name = myOlApp.GetNamespace("MAPI")
Set fldFolder = name.Folders("olinbox")
'For Each prfolder In fldFolder
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Call GetFolderInfo(fldFolder)
GetFolderInfo is listing folders in fldfolder.
But i want to check for all folders in outlook.(like folders in outbox, inbox....)
How can i list them?