To create new folder at inbox level

  • Thread starter Thread starter KP
  • Start date Start date
K

KP

how can i create folder at "inbox" level.
i want a folder to be created as a sibling of inbox and not sub folder

Set myTaskFolder = oNS.GetDefaultFolder(olFolderInbox)
Set myNewFolder = myTaskFolder.Folders.Add("kptest")
myNewFolder.MoveTo oNS.GetFolderFromID(strEntryId, strStoreId)


moveTo method doesnt happen

can some one help?
KP
 
YOu need to be adding the folder to the Inbox's parent folder:

Set myTaskFolder = oNS.GetDefaultFolder(olFolderInbox)
Set rootfolder = myTaskFolder.Parent
Set myNewFolder = rootfolder.Folders.Add("kptest")

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Sue.. Awesome.

thanks

is it possible to add my own icons instead of default once? if so how ?

YOu need to be adding the folder to the Inbox's parent folder:

Set myTaskFolder = oNS.GetDefaultFolder(olFolderInbox)
Set rootfolder = myTaskFolder.Parent
Set myNewFolder = rootfolder.Folders.Add("kptest")

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
No. Icons in the folder list are controlled by Outlook according to the folder type
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top