How and Where to create Hidden Folder

  • Thread starter Thread starter Ryan
  • Start date Start date
R

Ryan

I've read messages that you can create hidden folders with CDO. Where
and how do I create this folder. Can I create folders underneath this
folder? I've read that you can create it under the non-IPM folders
but I have not been able to get there. Can someone point me in the
right direction. Appreciate it.
 
This code snippet would create a hidden folder under the MAPI RootFolder:

Const CdoPR_FINDER_ENTRYID = &H35E70102

Dim objSession As New MAPI.Session
Dim objInfostore As MAPI.InfoStore
Dim objFinderFolder As MAPI.Folder
Dim objRootFolder As MAPI.Folder
Dim objFolders As MAPI.Folders
Dim objFolder As MAPI.Folder
Dim strFinderEntryID As String

objSession.Logon "", "", False, False
Set objInfostore = objSession.GetInfoStore(objSession.Inbox.StoreID)
strFinderEntryID = objInfostore.Fields.Item(CdoPR_FINDER_ENTRYID).Value
Set objFinderFolder = objSession.GetFolder(strFinderEntryID,
objInfostore.ID)
Set objRootFolder = objSession.GetFolder(objFinderFolder.FolderID,
objInfostore.ID)
Set objFolders = objRootFolder.Folders
Set objFolder = objFolders.Add("Foobar")
 
Thanks ken,
Just out of curiosity is it possible to set the folder property in
an OVC to view this folder? If so what would be the parameters you
would have to set? Thanks
 
I don't use the OVC so I can't answer that. If you can feed the OVC a folder
EntryID then you can use it. I'd suspect you can't but you'd have to test
that yourself.
 
Back
Top