Is it possible to find out if a MAPIFolder is in the olDefaultFolders constant list?

Status
Not open for further replies.
D

Daryl

Hi

I would like to know if there is anyway of finding out if a folder is in the

OlDefaultFolder constants.

I can see the method GetDefaultFolder(FolderTypeEnum) and return a

MAPIFolder is there any way to then get from that returned folder if it is a

olFolderInbox for example?

daryl
 
What exactly are you trying to do?

You can find out the default item type of a folder using

MAPIFolder.DefaultItemType.

If you want to know if a specific folder is a default folder, for example

Inbox, as opposed to being a user-created email folder, how you do that

depends on what version of Outlook you are using and what API's you are

using.

Probably the simplest way to find if a folder is one of the default ones

without comparing folder EntryID's is to get the FolderPath property, which

is a string, of the folder and the Inbox folder (or other default folder)

and compare the FolderPath strings.

"Daryl" <developer@hotmail.com> wrote in message

news:e2Tbn4rNKHA.3992@TK2MSFTNGP04.phx.gbl...
> Hi
> I would like to know if there is anyway of finding out if a folder is in
> the OlDefaultFolder constants.

> I can see the method GetDefaultFolder(FolderTypeEnum) and return a
> MAPIFolder is there any way to then get from that returned folder if it is
> a olFolderInbox for example?

> daryl
 
Thanks for the reply and the information.

What am I trying to do.

I would like to iterate through all the folders in the name space and while

looping through them I would like to see if the folder is one in the

olDefaultFolder constants. It would be nice if a folder had as a property

this constant, then it would be simple to see if it was a folder of

particular interest.

thanks

daryl
<kenslovak@mvps.org> wrote in message

news:eO$CIVtNKHA.220@TK2MSFTNGP02.phx.gbl...
> What exactly are you trying to do?

> You can find out the default item type of a folder using
> MAPIFolder.DefaultItemType.

> If you want to know if a specific folder is a default folder, for example
> Inbox, as opposed to being a user-created email folder, how you do that
> depends on what version of Outlook you are using and what API's you are
> using.

> Probably the simplest way to find if a folder is one of the default ones
> without comparing folder EntryID's is to get the FolderPath property,
> which is a string, of the folder and the Inbox folder (or other default
> folder) and compare the FolderPath strings.

> >

>

> "Daryl" <developer@hotmail.com> wrote in message
> news:e2Tbn4rNKHA.3992@TK2MSFTNGP04.phx.gbl...
> > Hi
> > I would like to know if there is anyway of finding out if a folder is in
> > the OlDefaultFolder constants.
>

>> I can see the method GetDefaultFolder(FolderTypeEnum) and return a
> > MAPIFolder is there any way to then get from that returned folder if it
> > is a olFolderInbox for example?
>

>> daryl

>
 
Thanks for the reply and the information.

What am I trying to do.

I would like to iterate through all the folders in the name space and while

looping through them I would like to see if the folder is one in the

olDefaultFolder constants. It would be nice if a folder had as a property

this constant, then it would be simple to see if it was a folder of

particular interest.

thanks

daryl
<kenslovak@mvps.org> wrote in message

news:eO$CIVtNKHA.220@TK2MSFTNGP02.phx.gbl...
> What exactly are you trying to do?

> You can find out the default item type of a folder using
> MAPIFolder.DefaultItemType.

> If you want to know if a specific folder is a default folder, for example
> Inbox, as opposed to being a user-created email folder, how you do that
> depends on what version of Outlook you are using and what API's you are
> using.

> Probably the simplest way to find if a folder is one of the default ones
> without comparing folder EntryID's is to get the FolderPath property,
> which is a string, of the folder and the Inbox folder (or other default
> folder) and compare the FolderPath strings.

> >

>

> "Daryl" <developer@hotmail.com> wrote in message
> news:e2Tbn4rNKHA.3992@TK2MSFTNGP04.phx.gbl...
> > Hi
> > I would like to know if there is anyway of finding out if a folder is in
> > the OlDefaultFolder constants.
>

>> I can see the method GetDefaultFolder(FolderTypeEnum) and return a
> > MAPIFolder is there any way to then get from that returned folder if it
> > is a olFolderInbox for example?
>

>> daryl

>
 
At the Outlook object model level comparing the folder paths is probably the

easiest way to go.

At a lower level you can get the EntryID's of the default folders directly

or from properties on the Store and Inbox objects and use a method to

compare the EntryId's. Those should not be directly compared as they can be

short or long term id's that are equivalent but not equal.

But the lower level methods use either deprecated API's such as CDO 1.21 or

3rd party API's such as Redemption (www.dimastr.com/redemption) or Extended

MAPI (C++ or Delphi only).

"Daryl" <developer@hotmail.com> wrote in message

news:ugO1T22NKHA.4964@TK2MSFTNGP06.phx.gbl...
> Thanks for the reply and the information.

> What am I trying to do.

> I would like to iterate through all the folders in the name space and
> while
> looping through them I would like to see if the folder is one in the
> olDefaultFolder constants. It would be nice if a folder had as a property
> this constant, then it would be simple to see if it was a folder of
> particular interest.

> thanks
> daryl
 
Re: Is it possible to find out if a MAPIFolder is in theolDefaultFolders constant list?

See http://www.dailydoseofexcel.com/archives/2009/03/20/outlook-default-folders/

--JP

On Sep 16, 7:09 am, "Daryl" <develo...@hotmail.com> wrote:
> Hi
> I would like to know if there is anyway of finding out if a folder is in the
> OlDefaultFolder constants.

> I can see the method GetDefaultFolder(FolderTypeEnum) and return a
> MAPIFolder is there any way to then get from that returned folder if it is a
> olFolderInbox for example?

> daryl
 
I don't know that I'd recommend using a string equality comparison for

EntryID's though. It might work some of the time but it's not guaranteed to

work like a true CompareID's method would.

"JP" <jp2112@earthlink.net> wrote in message

news:df5dc4c7-79d8-4044-ae2e-209f15f44a5e@p15g2000vbl.googlegroups.com...

See

http://www.dailydoseofexcel.com/archives/2009/03/20/outlook-default-folders/

--JP

On Sep 16, 7:09 am, "Daryl" <develo...@hotmail.com> wrote:
> Hi
> I would like to know if there is anyway of finding out if a folder is in
> the
> OlDefaultFolder constants.

> I can see the method GetDefaultFolder(FolderTypeEnum) and return a
> MAPIFolder is there any way to then get from that returned folder if it is
> a
> olFolderInbox for example?

> daryl
 
Re: Is it possible to find out if a MAPIFolder is in theolDefaultFolders constant list?

Perhaps a combination of EntryID and FolderPath comparisons?

--JP

On Sep 18, 10:11 am, "
<kenslo...@mvps.org> wrote:
> I don't know that I'd recommend using a string equality comparison for
> EntryID's though. It might work some of the time but it's not guaranteed to
> work like a true CompareID's method would.

> >

> http://www.slovaktech.com

> "JP" <jp2...@earthlink.net> wrote in message

> news:df5dc4c7-79d8-4044-ae2e-209f15f44a5e@p15g2000vbl.googlegroups.com...
> Seehttp://www.dailydoseofexcel.com/archives/2009/03/20/outlook-default-f....

> --JP

> On Sep 16, 7:09 am, "Daryl" <develo...@hotmail.com> wrote:

>
 
Well, normally I'd be using Redemption or some other lower level API where

I'd have access to a CompareID() type method, and there is the case that in

general the OOM returns the long-term EntryID so you don't have to worry

about long or short term id's, but I'm always leery about trusting a direct

string comparison there. (Nice run on sentence there)

FolderPath should be pretty much a slam dunk for that as long as nothing is

hard-coded, and of course assuming an OOM version that has that property is

being used. NameSpace.GetDefaiultFolder() followed by string equality for

the path of the folder being tested I'd guarantee (as Justin Wilson used to

say with that wonderful Cajun accent <g>).

"JP" <jp2112@earthlink.net> wrote in message

news:a02502cd-9991-4904-8a94-11e319d5d9ed@q35g2000vbi.googlegroups.com...

Perhaps a combination of EntryID and FolderPath comparisons?

--JP
 
Re: Is it possible to find out if a MAPIFolder is in theolDefaultFolders constant list?

I'd forgotten about that guy, and I watched his cooking show. :p

--JP

On Sep 18, 11:06 am, "
<kenslo...@mvps.org> wrote:
> Well, normally I'd be using Redemption or some other lower level API where
> I'd have access to a CompareID() type method, and there is the case that in
> general the OOM returns the long-term EntryID so you don't have to worry
> about long or short term id's, but I'm always leery about trusting a direct
> string comparison there. (Nice run on sentence there)

> FolderPath should be pretty much a slam dunk for that as long as nothing is
> hard-coded, and of course assuming an OOM version that has that property is
> being used. NameSpace.GetDefaiultFolder() followed by string equality for
> the path of the folder being tested I'd guarantee (as Justin Wilson used to
> say with that wonderful Cajun accent <g>).

> >

> http://www.slovaktech.com

>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
C New pc, new outlook, is it possible to import auto-complete emailaddress Using Outlook 4
e_a_g_l_e_p_i Is it possible to have a reminder in Outlook 2021 for every 90 days Using Outlook 3
W Outlook 2016 MSI - Possible to make work with O365 modern Auth & Win7? Using Outlook 4
O Outlook - How to embed font ? (If at all possible) Using Outlook 2
S Outlook 365 Can I change the possible range of highlighting colours when writing an Outlook email? Using Outlook 1
T Outlook 2013 Possible interference by Telstra ISP with Hotmail Password Using Outlook.com accounts in Outlook 4
e_a_g_l_e_p_i Is it possible to transfer things from one calendar to another Using Outlook 2
V Is it possible to collect statistics from Outlook forms? Outlook VBA and Custom Forms 1
e_a_g_l_e_p_i Is it possible it set the fonts used to read incoming mail Using Outlook 25
S Is it possible to cusstomise selectable Options in Kalander. Outlook VBA and Custom Forms 1
J Is it no longer possible to suppress Outlook 2019 Invalid Certificate name mismatch security alert via Registry? Using Outlook 1
BretAB Is it possible to add a lookup field to a Message form? Outlook VBA and Custom Forms 4
A Possible to hide ribbon with custom appointment form? Outlook VBA and Custom Forms 3
M possible to search Outlook for multiple email addresses at once? Using Outlook 1
semnaitik Is it possible to recover content from a 0KB PST file? Using Outlook 3
J Is this possible to do with a macro? Outlook VBA and Custom Forms 17
D Is it possible to automatically send an email when it is moved to a folder? Exchange Server Administration 1
T Exchange setup not possible with outlook.de username Using Outlook.com accounts in Outlook 0
H Is it possible to create a view that only show the first task in a list? Using Outlook 1
H Is It Possible to See Who Has Viewed My Calendar in Exchange? Using Outlook 2
P Is it possible to convert address book to "Auto-Complete List" (NK2)? Using Outlook 5
C in outlook 2007-Contact Group-One name have 3 mail id-its possible? Using Outlook 3
J convert .pst to .eml, how is it possible? Using Outlook 1
S Is it possible to recover a permanently deleted email from my .OST file? Using Outlook 0
M Is it possible to restore deleted webmail to server? Using Outlook 3
P Is it possible to write a macro to email to all addresses of selected contacts? Using Outlook 1
D is it possible to have both a POP and IMAP account in Outlook 2013? Using Outlook 5
C Is it possible to have contacts sync real-time between Outlook and iCloud? Using Outlook 1
P Is it possible to sort emails by COUNT of "From" field? Using Outlook 2
Justo Horrillo It's possible to modify the behaviour of the conversation option? Using Outlook 2
S Possible to link to ics file without importing? Using Outlook 4
P Outlook 2003 - possible to recreate corrupt account? Using Outlook 3
FirefIy Marking message read only if replied to the message or Ctrl+Q. Possible? Using Outlook 1
O Script to move emails to a folder based on various possible keywords Outlook VBA and Custom Forms 11
A Is it possible to remove the word Categories: from task list views? Using Outlook 2
B Is it possible with Outlook form Outlook VBA and Custom Forms 5
Steve Jacobs Possible to configure TNEF options based on *sender*? Exchange Server Administration 3
S Is it possible to backup Outlook.com/Outlook 2013 Email & Calendar info? Using Outlook.com accounts in Outlook 3
O Is it possible to go from BCM Office 13 back to BCM Office 2010? BCM (Business Contact Manager) 1
E Show field from account on contact form - possible? BCM (Business Contact Manager) 1
A Possible to modify people preview window? Using Outlook 1
T OL BCM 2007 - Possible to migrate SQL Server Express 2012 ? BCM (Business Contact Manager) 2
V Name of attachment in replies (HTML) - possible?? Using Outlook 12
C Is it possible: List of URL fields BCM (Business Contact Manager) 0
D Frequently used response short cut possible macro Using Outlook 1
mrje1 Assigned Categories keep getting deleted in mail, bug? How to fix if possible? Using Outlook 5
Commodore Exporting all contacts to VCF files possible? Using Outlook 4
M I'd like to alter the appointment balloons. Possible? Using Outlook 6
J Is it possible to highlight a folder in Outlook 2007? Using Outlook 2
L I want ONE calendar if possible with no overlaying Using Outlook 1

Similar threads

Back
Top