Discussion:
Word XP security settings
(too old to reply)
sprungli
2004-08-20 02:47:52 UTC
Permalink
My Word template is a client of a COM object (a .NET component wrapped in a
CCW), which in turn accesses a disk file on the local machine. Every
possible user in any role on this machine has full control rights on that
file (testing scenario). There is also a parallel managed client to test
reading from/writing to the file and both operations work as expected. The
VBA project inside the template calls exactly the same methods as the
managed client. With the VBA debugger I can see the COM object is well there
when referenced. The Word template can read from the file but cannot write
to it. I am almost sure the problem is in the security settings of Word XP,
but don't know exactly where. Anyone who has run into a similar problem, or
has any clue, or can suggest a relevant reading, please help.

TIA

(I have tried setting Security Level to Low with Trust all installed add-ins
and templates, and Trust access to VB Project checked, but got the same
result.)
Cindy M -WordMVP-
2004-08-22 15:02:06 UTC
Permalink
Hi Sprungli,
Post by sprungli
The Word template can read from the file but cannot write
to it. I am almost sure the problem is in the security settings of Word XP,
Word, itself, has no security settings which can effect accessing files. The
only security functionality built into Word/Office has to do with macros.

Are you certain the user has OS permissions to write to a file in the folder
in which it is located?

Have you tested whether a macro in Word/VBA is able to write to a similar
type of file in this location?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)
sprungli
2004-08-24 01:29:24 UTC
Permalink
Thank you Cindy,

yes, all the proper permissions are set, as specified in my post. Also
there, Word cannot write to (nor read from) remote resources. Even if it
could, it would have been a poor design to allow it. But you are right for
the security settings of Word. What I meant was that Word could have somehow
blocked the access to a DLL executing with errors, or something like that. I
tried with another COM client though, and it reproduced the error, so it
must be my code.

sprungli

---
Post by Cindy M -WordMVP-
Hi Sprungli,
Post by sprungli
The Word template can read from the file but cannot write
to it. I am almost sure the problem is in the security settings of Word XP,
Word, itself, has no security settings which can effect accessing files. The
only security functionality built into Word/Office has to do with macros.
Are you certain the user has OS permissions to write to a file in the folder
in which it is located?
Have you tested whether a macro in Word/VBA is able to write to a similar
type of file in this location?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)
Cindy M -WordMVP-
2004-08-24 12:40:03 UTC
Permalink
Hi Sprungli,
Post by sprungli
What I meant was that Word could have somehow
blocked the access to a DLL executing with errors, or something like that.
Ah, OK. If that ever happens to a COM addin I believe one needs to "unblock"
it in the Registry. I can't remember the exact details, but as soon as an
error occurs, the DLL will no longer load automatically because the Registry
setting that would allow that has been set to not allow it.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :-)

Loading...