Articles in this section
Category / Section

How do I edit Custom Properties of a document

1 min read

 

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

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied