Re: Name/number of Current Folder
- From: "Josh Einstein" <josheinstein@xxxxxxxxxxx>
- Date: Tue, 20 Dec 2005 11:05:15 -0500
Sounds like you're looking for a Guid of some sort for language-insensitive
comparison. Unfortunately, as Sue mentioned there isn't one.
What you can do is use the GetDefaultFolder() method of the Namespace and
compare the EntryID of the MAPIFolder that it returns. If you're using VBA
you may just be able to compare the object references, but I'm using C# and
they tend to return different instances on each call.
Dim ns As Namespace
Dim currentFolder As MAPIFolder
Dim sentFolder As MAPIFolder
Set ns = Application.GetNamespace("MAPI")
Set currentFolder = Application.ActiveExplorer().CurrentFolder
Set sentFolder = ns.GetDefaultFolder(olFolderSentMail)
If currentFolder.EntryID = sentFolder.EntryID Then
....
End If
--
Josh Einstein
Tablet Enhancements for Outlook 2.0 - Try it free for 14 days
www.tabletoutlook.com
"????" <@discussions.microsoft.com> wrote in message
news:DC545EE7-947E-4BC2-A260-AF7D0A6C6CE8@xxxxxxxxxxxxxxxx
>
> Hello!
>
> I wrote the following line in a macro:
> Dim folderName As String
> folderName = Application.ActiveExplorer.CurrentFolder
>
> after running the line, I get the name of the Current Folder. I want the
> number of the folder, because people use different langueges in outlook,
> and
> the name "Inbox" or "Sent Items" is in different langueges by each user.
> How
> can I get the number of the folder instead of the name?
>
> Thanks,
> Yonina.
>
.
- Prev by Date: Re: Problem running a macro in outlook
- Next by Date: Re: user
- Previous by thread: Re: Name/number of Current Folder
- Next by thread: Re: Name/number of Current Folder
- Index(es):
Relevant Pages
|