IRM and automation

R

raan0101

Hi,
I can open, edit,save the file,but I can not apply IRM to Word in
asp.net.

my code likes this:


Doc = WordApplication.Documents.Open(); // open
WordApplication.Selection.TypeText("edit it");// edit it
// Doc.Permission.Add(userid, permission, expireddate) // apply IRM
Doc.Save(); // save
WordApplication.Application.quit();// quit


if i uncomments the Permission.Add code, it will throws exception
message


Word cannot save or create this file. Make sure that the disk you want
to
save the file on is not full, write-protected, or damaged.
(C:\test\test.doc)


The code works fine in Windows App,but fails in asp.net.


I have full-control access to the doc, as I have do the configuration
according to http://support.microsoft.com/kb/288366/
And my web application runs under the admin account.


Can anyone give me some clues? Thanks!

Raan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top