Exception When Setting Password

C

ckapilla

Hi

I have recently released a COM-AddIn for Word 2007 product in beta test. At
two customer sites an error is occuring when the program attempts to set the
password programmatically.

To restrict the number of variables, I have created a bare-bones program
that does nothing but the following operations:
starts up Word;
opens a blank document;
and then attempts to set the password to an empty string.
i.e.,
activeDocument.Password="";
This is about as simple as you can get and works fine most everywhere I have
tried it. But on these two machines an exception is thrown every time:

Exception: Bad Password
Stack:
at Microsoft.Office.Interop.Word.DocumentClass.set_Password(string)

We have done a 'repair' installation of Word and I have looked for any
obvious problems in his setup and not found anything.

This one really has me stumped. Any help or even wild suggestions of things
to try would be greatly appreciated.

TIA,

Chris K
 
T

Terry Farrell

I suggest that you post this one into an appropriate Word VBA newsgroup when
the developers hang out.
 
C

ckapilla

I did find the solution in another group -- Word Options User Name being set
to a single blank character (apparently the default on pre-installed
instances) causes all sorts of automation problems. Fortunately the fix is
trivial.
 

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