How Can I progrematicly mail Enable a Public folder (VBS)

How Can I progrematicly set a PF to be mail Enabled?
(Prefered in VBS)

I know how to set a new folder

set Application = CreateObject("Outlook.Application")
Set NameSpace = Application.GetNameSpace("MAPI")
Set oMailInTop = OpenMAPIFolder ("\Public Folders\All Public Folders\PutItUnderHere\AndHere")
Set MyNewFolder = oMailInTop.Folders.Add(sMailInName)

Now how do I also set it to be Mail-Enabled?
And how do I set Replication Topology

It all has to be done via Script
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David WilhoitSenior Consultant, ExchangeCommented:;en-us;297390

...from the article:

Advantages of Using CDO
• Mail properties: CDO provides the ability to manipulate mail-related properties on public folders. To access these properties, you can use the CDO.IFolder interface to bind to the folder and then query for the CDOEXM.IMailRecipient interface.

Disadvantages of Using CDO
• Minimum software requirement: Code that uses CDO and CDOEXM recipient-management interfaces must be run on an Exchange 2000 Server. This is because the CDO interfaces (Cdoex.dll) are installed as part of Exchange 2000 Server.

Also check out the related link at the bottom,


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GMsbAuthor Commented:
It took me long time  but I made it
Thanks Kindo for the initial referal and the point I missed which was IT CAN'T run on WinXP only Win 2000 or 2003 SERVER.
Also I want to share some cool link to a manual: Introduction to the use of Exchange 2000 with WSH 

And here is the needed script

 Dim oMailRecipient
 Dim oMailingListFolder

sFolderName="My new Mail Enabled Folder"
sDescription = "Mail-In Automated:)"
Set oMailingListFolder = CreateObject("CDO.Folder")

   With oMailingListFolder
     .Description = sDescription
     .ContentClass = "urn:contact-classes:mailfolder"
     ' Save to the public store
     .DataSource.SaveTo "http://MyExhangeServer/public/subfolder\"& sFolderName
   End With
   ' Set the mail attributes
   Set oMailRecipient = oMailingListFolder.GetInterface ("IMailRecipient")

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.