I was trying tu use the automatation API for setting the user permissions of a document. Tried with the method CopyFrom from the IDocumentUserPermissions interface. It seems that the permissions change but I can't find a way to set the new permissions to my document.
For this task I used the following code (Using VB.net):