Attribute VB_Name = "Module1"
Sub main()
Dim objFolder As New CDO.Folder
Dim objMailRecipient As CDOEXM.IMailRecipient
Dim objRecord As New ADODB.Record
Dim strURL As String

strURL = "File://./BackofficeStorage/ywd.extest.microsoft.com/Public folders/MyFolder"

objRecord.Open strURL, , adModeReadWrite, adCreateCollection Or adOpenIfExists

objFolder.DataSource.Open strURL, , adModeReadWrite

Set objMailRecipient = objFolder.GetInterface("IMailRecipient")
objMailRecipient.MailDisable

objFolder.DataSource.Save

objRecord.Close
Set objRecord = Nothing
Set objFolder = Nothing
Set objMailRecipient = Nothing

End Sub
