Exchange Server about document property extensions

Source: Internet
Author: User
Server

1, customize a content class such as: Urn:contentclasses:document1
There are custom attributes: Clicknumber
2, the content class for the document you are building is defined as 1.
3, establish a form registration
Urn:schemas-microsoft-com:office:forms#contentclass for the 1 established urn:contentclasses:document1
Urn:schemas-microsoft-com:office:forms#cmd for *
Urn:schemas-microsoft-com:office:forms#formurl for chkopen.asp
Urn:schemas-microsoft-com:office:forms#executeurl for chkopen.asp

Urn:schemas-microsoft-com:office:forms#binding Server

4,list.asp
<%
Function addquotes (strvalue)
Const QUOTE = "" "" "
Addquotes = _
QUOTE _
& Replace (strvalue, QUOTE, QUOTE & QUOTE) _
& QUOTE
End Function
Dim CNN ' as ADODB. Connection
Dim rst ' as ADODB. Recordset
Dim urlfld ' as String
Dim strSQL ' as String

URLFLD = "http://aaa.com/fld1/"
Set cnn = CreateObject ("ADODB.") Connection ")
With CNN
. Provider = "Exoledb.datasource"
. Open URLFLD
End With
strSQL = "Select" & _
Addquotes ("Dav:displayname") & "," & _
Addquotes ("Dav:contentclass") & "," & _
Addquotes ("Clicknumber") & "," & _
Addquotes ("Dav:href")
strSQL = strSQL & _
"From SCOPE (' Shallow Traversal of" & _
Addquotes (URLFLD) & "')"
strSQL = strSQL & _
"WHERE" & Addquotes ("Dav:contentclass") & _
"= ' urn:contentclasses:document1 '"
strSQL = strSQL & _
"Order BY" & Addquotes ("Dav:displayname")
Set rst = CreateObject ("ADODB.") Recordset ")
With RST
. Open strSQL, CNN
End With


Response. Write "<table>"

Do Until rst. Eof
Response. Write "<tr><td width=200>"
%>
<a href= ". /fld1/<%=rst. Fields ("Dav:displayname")%> "></a>
<%
Response. Write "</td></tr>"
Rst. MoveNext
Loop

Response. Write "</table>"
Rst. Close
Cnn. Close
Set rst = Nothing
Set cnn = Nothing
%>


5,chkopen.asp

<%
Dim Rec
Dim II
Dim CNN
Dim strURL

Strdataurl = Request.QueryString ("Dataurl")
Set cnn = CreateObject ("Adodb.connection")
With CNN
. Provider = "Exoledb.datasource"
. Open Strdataurl
End With
Set rec = server. CreateObject ("Adodb.record")
Rec. Open Strdataurl, CNN, 3 ' adModeReadWrite
Ii=rec.fields ("Clicknumber")
Rec.fields ("Clicknumber") =ii+1
Rec.fields.update
Rec.close
%>
Open item .....


Run list.asp
Call Chkopen.asp when the file is clicked so that clicknumber+1 opens the file at the same time. Its URL is completed by Strdataurl = Request.QueryString ("Dataurl").



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.