?
Solved

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

Posted on 2004-11-14
2
Medium Priority
?
504 Views
Last Modified: 2008-01-09
How Can I progrematicly set a PF to be mail Enabled?
(Prefered in VBS)

I know how to set a new folder


sMailInName="MyNewFolder"
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
0
Comment
Question by:GMsb
2 Comments
 
LVL 24

Accepted Solution

by:
David Wilhoit earned 1000 total points
ID: 12587070
http://support.microsoft.com/default.aspx?scid=kb;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,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_cdo_ifolder_interface.asp

D
0
 
LVL 5

Author Comment

by:GMsb
ID: 12988327
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
http://activeanswers.compaq.com/aa_downloads/6/100/225/1/42365.pdf 

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")
   oMailingListFolder.DataSource.Save  
   oMailRecipient.MailEnable
   oMailingListFolder.DataSource.Save

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to effectively resolve the number one email related issue received by helpdesks.
Exchange administrators are always vigilant about Exchange crashes and disasters that are possible any time. It is quite essential to identify the symptoms of a possible Exchange issue and be prepared with a proper recovery plan. There are multiple…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question