To create new folder at inbox level

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
 
S

Sue Mosher [MVP]

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
 
K

KP

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
 
S

Sue Mosher [MVP]

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
 

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