How do I edit Custom Properties of a document
CustomProperties of a document can be edited by replacing the existing value of the CustomProperty. This is done by using CustomDocumentProperties property of the document object. The following is the statement to set the value for a Custom Property.
C#
//If the value of the CustomProperty is true the value is changed to " Sample_Edited" (or) " Sample_Not_Edited" if false.
if ((string)document.CustomDocumentProperties["DocumentDescription1"].Value == "Sample")
//where "DocumentDescription1" is the CustomProperty Name of the Document.
document.CustomDocumentProperties["DocumentDescription1"].Value = "Sample_Edited";
else
document.CustomDocumentProperties["DocumentDescription1"].Value = "Sample_Not_Edited";
VB
' If the value of the CustomProperty is true the value is changed to " Sample_Edited" (or) "Sample_Not_Edited" if false.
If CStr(document.CustomDocumentProperties("DocumentDescription1").Value) = "Sample" Then
'where "DocumentDescription1" is the CustomProperty 'Name of the Document.
document.CustomDocumentProperties("DocumentDescription1").Value = "Sample_Edited"
Else
document.CustomDocumentProperties("DocumentDescription1").Value = "Sample_Not_Edited"
End If
Edit_Custom_Prperities