Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Programmatically hiding Outlook folders

43 views
Skip to first unread message

Leon

unread,
Jul 20, 2004, 4:02:36 PM7/20/04
to
I have a VB Add-In that uses a number of folders for temporary storage. Is
there a method or a property that Outlook exposes that would allow me to
make that folders invisible to the end user, but still give me access to all
of the items contained within?

Thank You

-Leon


Dmitry Streblechenko (MVP)

unread,
Jul 20, 2004, 5:45:47 PM7/20/04
to
No. You can use a folder in the non-IPM tree (only IPM tree in any message
store is visible to a user) or you can use associated (aka hidden) messages
in a folder.
Extended MAPI, CDO 1.21 or Redemption would let you do that, Outlook Object
Model does not provide access to this functionality.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Leon" <leond...@hotmail.com> wrote in message
news:%2398e2Rp...@TK2MSFTNGP11.phx.gbl...

Henry Gusakovsky

unread,
Jul 21, 2004, 3:35:20 AM7/21/04
to
Try to use PR_ATTR_HIDDEN property
PROP_TAG(PT_BOOLEAN, 0x10F4)
if it is "true" folder is not shown in the hierarhy.
Set it via CDO, ExMAPI or Redemtion library.

It works for me in Outlook XP.


WBR
Henry

"Leon" <leond...@hotmail.com> wrote in message
news:%2398e2Rp...@TK2MSFTNGP11.phx.gbl...

Leon

unread,
Jul 28, 2004, 11:46:53 AM7/28/04
to
Thank You very much for clearing this up, Dmitry!
"Dmitry Streblechenko (MVP)" <dmi...@dimastr.com> wrote in message
news:%23lVnpLq...@TK2MSFTNGP11.phx.gbl...

Leon Dragan

unread,
Aug 4, 2004, 12:14:22 PM8/4/04
to
Would you happen to have some sample code?

Thank You


"Dmitry Streblechenko (MVP)" <dmi...@dimastr.com> wrote in message
news:%23lVnpLq...@TK2MSFTNGP11.phx.gbl...

Dmitry Streblechenko (MVP)

unread,
Aug 4, 2004, 6:23:14 PM8/4/04
to
Sure. The code below assumes the MAPIFolder variable points to an Outlook
folder.

set sFolder = CreateObject("Redemption.MAPIFolder")
sFolder.Item = MAPIFolder
set Items = sFolder.HiddenItems
'search by subject
set HiddenMsg = Items.Item("My config message")
If (HiddenMsg is Nothing) Then
set HiddenMsg = Items.Add("IPM.Note.MyProduct.Config")
'set the subject so we can find this message next time
HiddenMsg.Subject = "My config message"
End If
'do something with the message, set properties, etc
...
HiddenMsg.Save


Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Leon Dragan" <leond...@hotmail.com> wrote in message
news:e7YD83je...@TK2MSFTNGP10.phx.gbl...

Leon Dragan

unread,
Aug 10, 2004, 10:02:51 AM8/10/04
to
I may be missing something but looks like this code will create a hidden
item (appointment, mail, contact), whereas what I need
to do is hide an entire folder. Is that possible?

"Dmitry Streblechenko (MVP)" <dmi...@dimastr.com> wrote in message
news:%23dyTeGn...@TK2MSFTNGP10.phx.gbl...

Dmitry Streblechenko (MVP)

unread,
Aug 10, 2004, 1:40:19 PM8/10/04
to
Correct. This code creates an invisible message in an existing folder.
To create an invisible folder, you will need to get to the top folder of the
message store, which is different from the top folder visible to the user.
The following code will create an invisible folder using CDO:

set RootFolder = CDOSession.GetFolder("")
set InvisibleFolder = RootFolder.Folders.Add("My invisible folder")

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Leon Dragan" <leond...@hotmail.com> wrote in message

news:uOvjSKu...@TK2MSFTNGP11.phx.gbl...

Leon Dragan

unread,
Aug 11, 2004, 10:38:29 AM8/11/04
to
Works great. Thanks a lot.

"Dmitry Streblechenko (MVP)" <dmi...@dimastr.com> wrote in message
news:uQLlZEwf...@tk2msftngp13.phx.gbl...
0 new messages