Document.Unprotect give runtime error 5485 - The password is incorrect

N

nishasunil

I am using Word.Application and Word.Document objects in Microsoft
Visual Basic 6.

When I open a word document in comments only mode from my application I
am protecting it using a password. I am assigning a GUID as password
and storing it in a global string variable. When I use the same global
string variable to unprotect the document, I get an error saying the
password is incorrect. I have tried printing the value of the global
string variable and it is same. Not sure how to get rid of this error.

Please help.
 
C

Cindy M.

I am using Word.Application and Word.Document objects in Microsoft
Visual Basic 6.

When I open a word document in comments only mode from my application I
am protecting it using a password. I am assigning a GUID as password
and storing it in a global string variable. When I use the same global
string variable to unprotect the document, I get an error saying the
password is incorrect. I have tried printing the value of the global
string variable and it is same. Not sure how to get rid of this error.

Please help.
Please tell us which version of Word is involved and show us the code...

Note also that this group is targeted at end-users. One of the
Office.developer newsgroups would be a better place to ask such a
question.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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