A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to know the folder name



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 24th 09, 10:57 AM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default How to know the folder name

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.


Ads
  #2  
Old November 24th 09, 02:54 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to know the folder name

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Ashish" wrote in message
...
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.


  #3  
Old November 25th 09, 07:28 AM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default How to know the folder name

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


  #4  
Old November 25th 09, 01:52 PM posted to microsoft.public.outlook.program_addins
Aditi
external usenet poster
 
Posts: 10
Default How to know the folder name

OutlookInterop.NameSpace olNameSpace = null;
OutlookInterop.MAPIFolder oCalendar = null;
olNameSpace =
ThisAddIn.ApplicationObject.GetNamespace("mapi");
oCalendar =
olNameSpace.GetDefaultFolder(OutlookInterop.OlDefa ultFolders.olFolderCalendar);
OutlookInterop.MAPIFolder folder =
ThisAddIn.ApplicationObject.ActiveExplorer().Curre ntFolder;
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


.

  #5  
Old November 25th 09, 02:34 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to know the folder name

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Ashish" wrote in message
...
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


  #6  
Old November 28th 09, 10:20 AM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default How to know the folder name

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.
"Ken Slovak - [MVP - Outlook]" wrote in message
...
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Ashish" wrote in message
...
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




  #7  
Old November 29th 09, 06:57 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How to know the folder name

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Ashish" wrote in message
...
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.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default folder to Public folder when Exporting outlook form data toexcel Cass Outlook - General Queries 1 January 11th 08 12:33 PM
Cannot display the folder. Microsoft Office Outlook cannot access thespecified folder location. Boppy Outlook - General Queries 1 December 19th 07 12:16 AM
modifing runAllInboxRules to allow selection of folder, or to run in current folder including subfolders Bruce Outlook and VBA 3 September 7th 07 06:49 AM
Public Folder/Folder Assistant Forwarding email w/o original sender name xtremluck Outlook - General Queries 2 December 20th 06 08:57 PM
activate contact folder from public folder with "show this folder as email address book using a prf file Frankie K. Outlook - Using Contacts 7 July 25th 06 05:37 PM


All times are GMT +1. The time now is 08:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.