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 » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook Script : How to get the current Folder



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 21st 07, 10:58 AM posted to microsoft.public.outlook.program_vba
bbnimda
external usenet poster
 
Posts: 94
Default Outlook Script : How to get the current Folder

Hi All,

How can I get the current folder, from where my form is launched,
I need to get also the parent

tks for help

--
http://bensoft.miniville.fr/


  #2  
Old November 21st 07, 01:16 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook Script : How to get the current Folder

Application.ActiveExplorer.?urrentFolder
Application.ActiveExplorer.?urrentFolder.Parent

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"bbnimda" wrote in message ...
Hi All,

How can I get the current folder, from where my form is launched,
I need to get also the parent

tks for help

--
http://bensoft.miniville.fr/


  #3  
Old November 21st 07, 02:57 PM posted to microsoft.public.outlook.program_vba
bbnimda
external usenet poster
 
Posts: 94
Default Outlook Script : How to get the current Folder

Hi Sue,

I didn't explain my self corectly (do to my bad english) here is an example
of my pb

my Outlook publics folder look like something like this

Publics Folder
|__All publics Folders
|__Business
| |__Companies
| |__Contacts
| |__Customers
| |__Done
| |__Providers
| |__Waiting
|__Private
|__Done
|__Waiting

Now if I want to jump from Business SubFolders (Waiting) to an other (Done)
I use this code

TheFolder = TARGET ' Target = on of my business folder ex: Done
Set myFolder = Application.GetNamespace("MAPI").Folders("publics
folders").Folders("all publics
folders").Folders("Business").Folders("TARGET")

and I repeat this each time I need to change folder

So I'm asking my self if there isn't a way faster and easier like getint the
current PATH and go to other folder by changing the last item of the path

like dos command ?

I hope my question est clear




"Sue Mosher [MVP-Outlook]" a écrit dans le message
de news: ...
Application.ActiveExplorer.?urrentFolder
Application.ActiveExplorer.?urrentFolder.Parent

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"bbnimda" wrote in message
...
Hi All,

How can I get the current folder, from where my form is launched,
I need to get also the parent

tks for help

--
http://bensoft.miniville.fr/




  #4  
Old November 21st 07, 03:23 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook Script : How to get the current Folder

All folders have a Parent property that represents the parent folder and a Folders property that holds the collection of subfolders. You use those to walk up and down the folder hierarchy. If TheFolder is the Business\Waiting folder, then this expression would return the Business\Done folder: TheFolder.Parent.Folders("Done")

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"bbnimda" wrote in message ...
Hi Sue,

I didn't explain my self corectly (do to my bad english) here is an example
of my pb

my Outlook publics folder look like something like this

Publics Folder
|__All publics Folders
|__Business
| |__Companies
| |__Contacts
| |__Customers
| |__Done
| |__Providers
| |__Waiting
|__Private
|__Done
|__Waiting

Now if I want to jump from Business SubFolders (Waiting) to an other (Done)
I use this code

TheFolder = TARGET ' Target = on of my business folder ex: Done
Set myFolder = Application.GetNamespace("MAPI").Folders("publics
folders").Folders("all publics
folders").Folders("Business").Folders("TARGET")

and I repeat this each time I need to change folder

So I'm asking my self if there isn't a way faster and easier like getint the
current PATH and go to other folder by changing the last item of the path



"Sue Mosher [MVP-Outlook]" a écrit dans le message
de news: ...
Application.ActiveExplorer.?urrentFolder
Application.ActiveExplorer.?urrentFolder.Parent

"bbnimda" wrote in message
...
Hi All,

How can I get the current folder, from where my form is launched,
I need to get also the parent

tks for help

--
http://bensoft.miniville.fr/




 




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
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
Outlook 2003 Script How to obtain the number of item in a folder ? bbnimda Outlook and VBA 1 June 28th 07 06:33 PM
Create Folder in Outlook 2003 with GPO or script? kc2kth Outlook - Installation 1 March 29th 07 12:05 AM
Outlook 2003 Script: How to get the Index or number of items in a Folder news.microsoft.com Outlook and VBA 5 November 6th 06 10:11 PM
'Run a script' to open Current Calendar item henry Outlook - Using Forms 1 July 19th 06 10:29 PM


All times are GMT +1. The time now is 12:25 PM.


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.