Custom public Contact folder.. how to ????? 
Author Message
 Custom public Contact folder.. how to ?????

Hi all

I want to create a Contact folder in public folders in Exchange Server 2000.
I've got sample application that creates Message folder, i tried tweak it
for Contact folder but of no use. Cud u pl help me what changes sud i make
in following code for this....
also..
for accessing this folder from OWA i need to make custom HTML forms, how sud
i associate my form with this folder??? i just need to change 'new' and
'open' commands.. rest sud be default to Contact folder....

Here is the code...

Install
Sub Install
'Get the folder
sFolder = InputBox("Please enter the URL to the folder: example
http://serverName/public/foldername","Setup Instructions")
If Trim(sFolder) = "" Then
    Exit Sub
End If

'Create the app folder, pointing the SCR to the Resources subfolder
Set oDest = CreateObject("CDO.Folder")
oDest.Fields("urn:schemas-microsoft-com:exch-data:schema-collection-ref") =
sFolder + "\Resources"
oDest.Fields("DAV:contentclass") = "urn:content-classes:folder"
oDest.Fields.Update
oDest.DataSource.SaveTo sFolder
'Create the Resources folder and make it invisible
Set oDest = CreateObject("CDO.Folder")
oDest.Fields("DAV:ishidden") = True
oDest.Fields.Update
oDest.DataSource.SaveTo sFolder +  "/Resources"

'Fill the Resources folder with form registrations

Set oCon = CreateObject("ADODB.Connection")
oCon.ConnectionString = sFolder + "/resources"
oCon.Provider = "ExOledb.Datasource"
oCon.Open

'----------------------------------------------------
'Register the default page for the folder
Set oRec = CreateObject("ADODB.Record")
oRec.Open "default.reg", oCon, 3, 0
oRec.Fields("DAV:contentclass") =
"urn:schemas-microsoft-com:office:forms#registration"
oRec.Fields("urn:schemas-microsoft-com:office:forms#contentclass") =
"urn:content-classes:message"
oRec.Fields("urn:schemas-microsoft-com:office:forms#cmd") = "*"
oRec.Fields("urn:schemas-microsoft-com:office:forms#formurl") =
"CustomMessage.asp"
oRec.Fields("urn:schemas-microsoft-com:office:forms#executeurl") =
"CustomMessage.asp"
oRec.Fields.Update
oRec.Close

'Further instructions
MsgBox "Copy CustomMessage.ASP into the Resources directory.  Enable script
execution on the  directory.", 64, "Further Instructions"

End Sub

pl indicate what changes sud be implemented in this???

tx

Deepesh



Fri, 30 Jan 2004 21:15:36 GMT  
 Custom public Contact folder.. how to ?????
You might try posting in one of the Exchange 2000 applications newsgroups.

--

Sue Mosher, Outlook MVP
Author of
     Teach Yourself Microsoft Outlook 2000 Programming in 24 Hours
     Microsoft Outlook 2000 E-mail and Fax Guide
Outlook and Exchange solutions at http://www.slipstick.com

Quote:

> Hi all

> I want to create a Contact folder in public folders in Exchange Server
2000.
> I've got sample application that creates Message folder, i tried tweak it
> for Contact folder but of no use. Cud u pl help me what changes sud i make
> in following code for this....
> also..
> for accessing this folder from OWA i need to make custom HTML forms, how
sud
> i associate my form with this folder??? i just need to change 'new' and
> 'open' commands.. rest sud be default to Contact folder....

> Here is the code...

> Install
> Sub Install
> 'Get the folder
> sFolder = InputBox("Please enter the URL to the folder: example
> http://serverName/public/foldername","Setup Instructions")
> If Trim(sFolder) = "" Then
>     Exit Sub
> End If

> 'Create the app folder, pointing the SCR to the Resources subfolder
> Set oDest = CreateObject("CDO.Folder")
> oDest.Fields("urn:schemas-microsoft-com:exch-data:schema-collection-ref")
=
> sFolder + "\Resources"
> oDest.Fields("DAV:contentclass") = "urn:content-classes:folder"
> oDest.Fields.Update
> oDest.DataSource.SaveTo sFolder
> 'Create the Resources folder and make it invisible
> Set oDest = CreateObject("CDO.Folder")
> oDest.Fields("DAV:ishidden") = True
> oDest.Fields.Update
> oDest.DataSource.SaveTo sFolder +  "/Resources"

> 'Fill the Resources folder with form registrations

> Set oCon = CreateObject("ADODB.Connection")
> oCon.ConnectionString = sFolder + "/resources"
> oCon.Provider = "ExOledb.Datasource"
> oCon.Open

> '----------------------------------------------------
> 'Register the default page for the folder
> Set oRec = CreateObject("ADODB.Record")
> oRec.Open "default.reg", oCon, 3, 0
> oRec.Fields("DAV:contentclass") =
> "urn:schemas-microsoft-com:office:forms#registration"
> oRec.Fields("urn:schemas-microsoft-com:office:forms#contentclass") =
> "urn:content-classes:message"
> oRec.Fields("urn:schemas-microsoft-com:office:forms#cmd") = "*"
> oRec.Fields("urn:schemas-microsoft-com:office:forms#formurl") =
> "CustomMessage.asp"
> oRec.Fields("urn:schemas-microsoft-com:office:forms#executeurl") =
> "CustomMessage.asp"
> oRec.Fields.Update
> oRec.Close

> 'Further instructions
> MsgBox "Copy CustomMessage.ASP into the Resources directory.  Enable
script
> execution on the  directory.", 64, "Further Instructions"

> End Sub

> pl indicate what changes sud be implemented in this???

> tx

> Deepesh



Fri, 30 Jan 2004 21:26:57 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Public Folder Contact folders.

2. Syncronize in programmatic way, the folder Contact with the public folder

3. How do I add a contact to a public folder programatically

4. Resolve Contact to Public Folder

5. Need sample code for read public folder contact into access

6. Enable a Public folder (contacts) for Outlook address Book

7. Create New Contact in Public Folder

8. Referring to Items in Public (Contacts) Folder

9. Synchronizing/exporting contacts into Public Folder

10. Creating Contacts in a Public Folder

11. Error copying a public Contact folder within Outlook 2000 SR1

12. Public Contacts Folder

 

 
Powered by phpBB® Forum Software