Mathieu, It works like a charm :-)
Nice work! Cheers, Victor -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mathieu CHATEAU Sent: woensdag 30 augustus 2006 22:15 To: Victor W. Cc: ActiveDir@mail.activedir.org Subject: Re[4]: [ActiveDir] Add folder with quota to existing mailboxes - via scripting or tool Hello Victor, sorry. Here is the working for the Root folder: On Error Resume Next set olApp = CreateObject("Outlook.Application") set inbox = olApp.GetNamespace("MAPI").getDefaultFolder(6).Parent set temp5 = inbox.folders.add("Added by vbscript",6) Regards, Mathieu CHATEAU http://lordoftheping.blogspot.com Wednesday, August 30, 2006, 8:01:50 PM, you wrote: VW> Thanks for this Mathieu, the script which creates the folder under VW> the inbox works good. VW> To create it in the root must be a little more complex because this VW> doesnt work yet. VW> When I fire up the script it prompts me with the following error: VW> Error: Object doesnt support this property or method: VW> 'olApp.GetNamespace(...).Folder' VW> Code: 800A01B6 VW> Can you point me in the right direction to solve this? VW> Cheers, VW> Victor VW> -----Original Message----- VW> From: [EMAIL PROTECTED] VW> [mailto:[EMAIL PROTECTED] On Behalf Of Mathieu VW> CHATEAU VW> Sent: maandag 28 augustus 2006 11:26 VW> To: [EMAIL PROTECTED] VW> Cc: ActiveDir@mail.activedir.org VW> Subject: Re[2]: [ActiveDir] Add folder with quota to existing VW> mailboxes - via scripting or tool VW> this script goes through outlook. VW> Each user need to fire this script (or fire it via logon script). VW> for the Root Folder, change: VW> set inbox = olApp.GetNamespace("MAPI").getDefaultFolder(6) VW> to VW> set inbox = olApp.GetNamespace("MAPI").Folder("Personal Folder") VW> (should do the trick but i didn't test it yet) VW> Regards, VW> Mathieu CHATEAU VW> http://lordoftheping.blogspot.com VW> Monday, August 28, 2006, 11:00:14 AM, you wrote: vwpn>> Thanks Brian and Mathieu, vwpn>> I will tell a little bit more about the background of this. The vwpn>> customer has asked for a folder called "private" to be created in vwpn>> the root of every users mailbox and if possible set a quota to vwpn>> this VW> folder. vwpn>> After this has been done, the customer wants to instruct his vwpn>> users to use only this folder only as their personal/private vwpn>> email folder and move everything that the users sees as being vwpn>> private, to the private folder. From that moment on, all other vwpn>> folders in the users mailboxes are no longer considered as private/personal. vwpn>> I do have some additional questions: vwpn>> - how would the script look if the requirement would be to create vwpn>> the folder in the root. vwpn>> - The way the script is set up now, do I have to set up which vwpn>> users this script will apply to, I mean will it now apply to all vwpn>> users in the entire domain which are mailbox enabled? vwpn>> - Is there any way that I can specify which users this script has vwpn>> to be applied to, I mean can I run it against all mailbox enabled vwpn>> users in a specific OU? vwpn>> ----------------------------------------------------------------- vwpn>> - vwpn>> ------ vwpn>> ------- vwpn>> Re[2]: [ActiveDir] Add folder with quota to existing mailboxes - vwpn>> via scripting or tool vwpn>> From: Mathieu CHATEAU <[EMAIL PROTECTED]> vwpn>> Date: Mon, 28 Aug 2006 00:24:47 +0200 vwpn>> ----------------------------------------------------------------- vwpn>> - vwpn>> ------ vwpn>> -------- vwpn>> Hello Victor, vwpn>> If the folder already exist, it will simply do nothing, except vwpn>> going into errors.. vwpn>> need to add a on error resume next or test if the folder exist before. vwpn>> will create in the inbox, as a subfolder vwpn>> I don't see your goal with this folder...except if you turn vwpn>> special rights on it. vwpn>> may ask them to put it [private] in the subject instead (it will vwpn>> work for the sent folders) vwpn>> Regards, vwpn>> Mathieu CHATEAU vwpn>> http://lordoftheping.blogspot.com vwpn>> Sunday, August 27, 2006, 10:26:59 PM, you wrote: vwpn>> Thanks Mathieu, nice. vwpn>> Does this create a folder in the root of the mailbox? vwpn>> vwpn>> Access all mailboxes you say, that sounds logical. I know that vwpn>> domain admins indeed dont actually have the full mailbox access vwpn>> (they have some denies). vwpn>> What if a user already has the folder, does this script take vwpn>> this into account? vwpn>> Again thanks. vwpn>> Victor vwpn>> From: Mathieu CHATEAU [mailto:[EMAIL PROTECTED] vwpn>> Sent: zondag 27 augustus 2006 22:04 vwpn>> To: Victor W. vwpn>> Cc: [EMAIL PROTECTED] vwpn>> Subject: Re: [ActiveDir] Add folder with quota to existing vwpn>> mailboxes - via scripting or tool vwpn>> Hello Victor, vwpn>> you will at least need an account that can access all mailboxes vwpn>> (not a domain admins one) vwpn>> (or give a script to everyone that they will execute) vwpn>> To my knowledge, quota is mailbox based. You may set up a special vwpn>> retention on this folder. vwpn>> sample _vbscript_ to create the private folder vwpn>> set olApp = CreateObject("Outlook.Application") vwpn>> set inbox = olApp.GetNamespace("MAPI").getDefaultFolder(6) vwpn>> set temp5 = inbox.folders.add("Private",6) vwpn>> hope it helps, vwpn>> Regards, vwpn>> vwpn>> Mathieu CHATEAU vwpn>> http://lordoftheping.blogspot.com vwpn>> Sunday, August 27, 2006, 8:57:03 PM, you wrote: vwpn>> Does anybody know what is the 'best' way to add vwpn>> automatically a folder to existing mailboxes and set a quota on vwpn>> that same folder? vwpn>> We would like all our users to get a folder called vwpn>> "private" added to the root of their mailbox and if possible, a vwpn>> quota to be set to that folder. vwpn>> Can this be done by scripting easily or is there perhaps vwpn>> even a tool which is capable of doing this? vwpn>> This also counts for new, still to be created users. I mean, vwpn>> every user that will be created will have to have that certain vwpn>> folder added to his or her mailbox. vwpn>> Offcourse this could be done by running the script a vwpn>> couple of times a day, checking if the folder exists allready and vwpn>> if not, adding it. Or perhaps it can even by realised the vwpn>> moment a user has been created. vwpn>> vwpn>> Any ideas are greatly appreciated. vwpn>> List info : http://www.activedir.org/List.aspx vwpn>> List FAQ : http://www.activedir.org/ListFAQ.aspx vwpn>> List archive: http://www.activedir.org/ml/threads.aspx VW> List info : http://www.activedir.org/List.aspx VW> List FAQ : http://www.activedir.org/ListFAQ.aspx VW> List archive: http://www.activedir.org/ml/threads.aspx List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.activedir.org/ml/threads.aspx List info : http://www.activedir.org/List.aspx List FAQ : http://www.activedir.org/ListFAQ.aspx List archive: http://www.activedir.org/ml/threads.aspx