Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Outlook Script : How to get the current Folder (http://www.outlookbanter.com/outlook-vba/61661-outlook-script-how-get-current.html)

bbnimda November 21st 07 10:58 AM

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/



Sue Mosher [MVP-Outlook] November 21st 07 01:16 PM

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/



bbnimda November 21st 07 02:57 PM

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/





Sue Mosher [MVP-Outlook] November 21st 07 03:23 PM

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/






All times are GMT +1. The time now is 10:36 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-2006 OutlookBanter.com