How to know the folder name

Status
Not open for further replies.
A

Ashish

How to get the folder name in any folder context menu event.

Create a folder under Inbox say folder1. To delete folder1, Select folder

Inbox. Right click on folder1 and select Delete. It will fire delete event

for context menu. In this delete event i can get the button for Delete

action on toolbar. But i do not know for which folder Delete event was

called.

ActiveExplorer->GetCurrentFolder() returns folder Inbox because before

deleting folder1 i select folder Inbox.

Is there any way to know that delete event was called for folder1.
 
Version of Outlook?

If this is Outlook 2007 you can use the

Application.FolderContextMenuDisplay() event to get the folder and its name

from the second argument passed to that event handler.

There's nothing really helpful for earlier versions of Outlook.

"Ashish" <akohli_2004@hotmail.com> wrote in message

news:uMiUeUPbKHA.544@TK2MSFTNGP05.phx.gbl...
> How to get the folder name in any folder context menu event.
> Create a folder under Inbox say folder1. To delete folder1, Select folder
> Inbox. Right click on folder1 and select Delete. It will fire delete event
> for context menu. In this delete event i can get the button for Delete
> action on toolbar. But i do not know for which folder Delete event was
> called.
> ActiveExplorer->GetCurrentFolder() returns folder Inbox because before
> deleting folder1 i select folder Inbox.
> Is there any way to know that delete event was called for folder1.
>
 
> If this is Outlook 2007 you can use the
> Application.FolderContextMenuDisplay() event to get the folder and its
> name from the second argument passed to that event handler.


thanks


> There's nothing really helpful for earlier versions of Outlook.


for outlook 2003 is there no way to track it
 
OutlookInterop.NameSpace olNameSpace = null;

OutlookInterop.MAPIFolder oCalendar = null;

olNameSpace =

ThisAddIn.ApplicationObject.GetNamespace("mapi");

oCalendar =

olNameSpace.GetDefaultFolder(OutlookInterop.OlDefaultFolders.olFolderCalendar);

OutlookInterop.MAPIFolder folder =

ThisAddIn.ApplicationObject.ActiveExplorer().CurrentFolder;

oCalendar.name will do ?

"Ashish" wrote:


> > If this is Outlook 2007 you can use the
> > Application.FolderContextMenuDisplay() event to get the folder and its
> > name from the second argument passed to that event handler.


> thanks
>
> > There's nothing really helpful for earlier versions of Outlook.


> for outlook 2003 is there no way to track it

> .
>
 
No, not really. There are hacks that can be used such as handling deletions

and then checking a list you maintain of existing folders and seeing what's

missing, but the problem is that in Outlook 2003 and earlier you can

right-click on something that's not selected and you never get the context

of what was actually right-clicked.

"Ashish" <akohli_2004@hotmail.com> wrote in message

news:OvIUpEabKHA.1596@TK2MSFTNGP06.phx.gbl...
> > If this is Outlook 2007 you can use the
> > Application.FolderContextMenuDisplay() event to get the folder and its
> > name from the second argument passed to that event handler.


> thanks
>
> > There's nothing really helpful for earlier versions of Outlook.


> for outlook 2003 is there no way to track it
>
 
> No, not really. There are hacks that can be used such as >handling
> deletions and then checking a list you maintain of >existing folders and
> seeing what's missing, b


Do you mean If we maintain a list of folders, after deleting a folder we'll

remove it from list. I am confuse with this solution. The reason is

I found a problem in outlook 2003. If folder1 exist under Inbox and i delete

folder1 then it will go to Deleted Items. But when i check parent folder

name for folder1, outlook still shows it Inbox (not Deleted Items). Outlook

2003 takes 1-2 seconds to change folder name.
<kenslovak@mvps.org> wrote in message

news:O3R%23UydbKHA.5976@TK2MSFTNGP05.phx.gbl...
> No, not really. There are hacks that can be used such as handling
> deletions and then checking a list you maintain of existing folders and
> seeing what's missing, but the problem is that in Outlook 2003 and earlier
> you can right-click on something that's not selected and you never get the
> context of what was actually right-clicked.

> >

>

> "Ashish" <akohli_2004@hotmail.com> wrote in message
> news:OvIUpEabKHA.1596@TK2MSFTNGP06.phx.gbl...
> >> If this is Outlook 2007 you can use the
> >> Application.FolderContextMenuDisplay() event to get the folder and its
> >> name from the second argument passed to that event handler.

>

>> thanks
> >
> >> There's nothing really helpful for earlier versions of Outlook.

>

>> for outlook 2003 is there no way to track it
> >

>
 
There's not much you can do about a lag like that, where the cached value is

invalid, if it's not due to unreleased objects. About all you can do is wait

it out.

"Ashish" <akohli_2004@hotmail.com> wrote in message

news:OolTnSBcKHA.2188@TK2MSFTNGP04.phx.gbl...
> > No, not really. There are hacks that can be used such as >handling
> > deletions and then checking a list you maintain of >existing folders and
> > seeing what's missing, b


> Do you mean If we maintain a list of folders, after deleting a folder
> we'll remove it from list. I am confuse with this solution. The reason is

> I found a problem in outlook 2003. If folder1 exist under Inbox and i
> delete folder1 then it will go to Deleted Items. But when i check parent
> folder name for folder1, outlook still shows it Inbox (not Deleted Items).
> Outlook 2003 takes 1-2 seconds to change folder name.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
T How to find or display the sub-folder name for an Archive Search Using Outlook 10
B Search and Find Email by Folder Name Outlook VBA and Custom Forms 2
G VBA to save selected Outlook msg with new name in selected network Windows folder Outlook VBA and Custom Forms 1
D Is a sub folder under contacts necessary to be able to name an Address Book? Using Outlook 1
B Extracting email addresses from a folder - how to also get the name of the person the address is for? Using Outlook 5
R Search/Jump to a folder by typing its name Outlook VBA and Custom Forms 1
A saving attachement to folder named the same as rule name Outlook VBA and Custom Forms 0
C Changing the name of Outlook Messages saved to a folder Using Outlook 1
M Is there any easy way to quickly search for the name of a folder in Outlook's inbox folder structure Exchange Server Administration 1
O Saving Attachments to folder on disk and adding Initials to end of file name Outlook VBA and Custom Forms 9
M Finding a folder by name Outlook 2013 Using Outlook 4
T Messages no longer move to quote folder on shared mailbox after user adds -D to folder name Outlook VBA and Custom Forms 1
S Macro to create a new folder with subject line as the folder name Using Outlook 2
T Outlook add-in: How to find localized name of the "Junk e-mail"folder Outlook VBA and Custom Forms 15
macdotcom Outlook 365 Outlook folder export to PST archival tool - close, but need a nudge Outlook VBA and Custom Forms 2
B How to get PST folder datetime? Outlook VBA and Custom Forms 1
M Search message, then (1) Jump to folder & (2) Select message that you searched for Outlook VBA and Custom Forms 6
G Search Folders and Jump to Folder Outlook VBA and Custom Forms 2
X Run macro automatically when a mail appears in the sent folder Using Outlook 5
P Can't add custom field to custom Outlook form, it always adds to the Folder instead Outlook VBA and Custom Forms 2
P Yahoo/IMAP folder rename by Outlook desktop 365 Using Outlook 0
A Outlook 2019 folder counter Using Outlook 0
A Search folder and move the email Outlook VBA and Custom Forms 0
N Reply to Outlook messages by moving messages to a specific Outlook folder Outlook VBA and Custom Forms 1
A Outlook 365 (OutLook For Mac)Move "On My Computer" Folder Items From Old To New Mac Computer Using Outlook 3
P Search folder: all emails sent to or from a domain Using Outlook 1
V Folder Properties - Gmail account can't switch Using Outlook 5
Victor_50 Outlook 2019 Jump to folder from search folder Outlook VBA and Custom Forms 0
HarvMan Outlook 365 - Rule to Move an Incoming Message to Another Folder Using Outlook 4
S Email Macros to go to a SHARED Outlook mailbox Draft folder...NOT my personal Outlook Draft folder Using Outlook 2
I Help with Smart Folder + Query Builder on IMAP Using Outlook 0
S Paperclip icon shows without attachment in email under Sent folder Using Outlook 0
Kika Melo Outlook Calendar deleted appointments not in Deleted Items folder Using Outlook 3
K vba code to auto download email into a specific folder in local hard disk as and when any new email arrives in Inbox/subfolder Outlook VBA and Custom Forms 0
Z Outlook 365 Automatically assign categories to incoming mail in a shared folder Round Robin Outlook VBA and Custom Forms 1
G Adding a contact to a specific folder Using Outlook 0
Witzker Outlook 2019 Macro GoTo user defined search folder Outlook VBA and Custom Forms 6
Rupert Dragwater Duplicate email in Folder Using Outlook 7
S Adding a recipient's column to Sent folder in Outlook 2010 Outlook VBA and Custom Forms 1
L "Insert Pictures" Button-Wrong Folder Using Outlook 5
C Outlook 365 Copy/Save Emails in Folder Outside Outlook to Show Date Sender Recipient Subject in Header Using Outlook 0
CWM330 Outlook 365 Hey Diane! MS 365 Biz Standard and "Potential Spam" addressed to others coming to my JUNK folder? Using Outlook 2
J Quick steps delete original email and move reply/sent email to folder Using Outlook 2
A manual rule sends mail to wrong folder Using Outlook 5
richardwing Auto forward email that is moves into a specific outlook folder Outlook VBA and Custom Forms 5
D This folder up to date vs all folders up to date Using Outlook 1
G Automatically delete messages in the synchronization folder Outlook VBA and Custom Forms 3
wayneame Changing the Form Used by Existing Task Items in a Folder Outlook VBA and Custom Forms 4
S Need code to allow defined starting folder and selection from there to drill down Outlook VBA and Custom Forms 10
P Emails assigned with a certain category (within a shared inbox) to be copied to a specific folder. Outlook VBA and Custom Forms 2

Similar threads

Back
Top