Project locked Project is unviewable

J

Jim

I am attempting to "lock for viewing" and include
passwords for various Word documents, to protect the VBA
associated with them. These documents are linked to an
Access 2000 db and contain merge fields and logic fields,
if that matters. While I am able to reach
the "protection" tab for some of the documents, for
others, Upon clicking on "project properties" I get a
message "project is locked. project is unviewable". What
does this mean and can I remedy it? Thank you in advance.

Jim
 
W

Word Heretic

G'day "Jim" <[email protected]>,

You need to explicitly open a global template (one that sits in the
StartUp folder) before you can edit it.


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Jim reckoned:
 
J

Jim

Thank you for your response.

I believe I created some confusion by using the wrong
terminology. I don't think I'm working with any *.dot
files and so I should not have used the term "template".
Rather, I am working with 40+ Word 2000 documents (a.k.a.
main merge documents?), linked to an Access 2000 db, that
contain merge fields and Word logic fields. The
documents at issue are these "main merge documents"
and the resulting merged documents, all of which, as I
understand it, are *.doc files. The "main merge
documents" are opened via corresponding command button in
Access 2000. I wish to place VBA in each of the "main
merge documents" that will cause them to open, merge into
a new document, and then close, leaving only the new
document open. (I have received help with the precise
code to use.) I have recently learned that any code
associated with each of the "main merge documents" will
not be associated with the new merged documents. I want
to keep users from accessing the VBA for any "main merge"
documents. I have experimented with a few of the "main
merge documents", adding appropriate VBA and then
attempting to add protection via the VB editor, by right
clicking on the project and then clicking on "project
properties". Often, with respect to the "main merge
documents" I tried this with, I received
the message "Project protected. Project is unviewable".
However, after working at it, I learned that I can access
the "project properties" for the main merge Word
documents so long as I do the following: Open one
document at a time from Access, using the appropriate
command button (but do not open a 2d document); do not
open the documents via Word or by double clicking on
their icons; after completing work on one document, it is
necessary to close not just the document, but also Word,
before opening the next document. Sounds crazy and, no
doubt, I messed something up along the way, but this is
the only solution I have found. (I wonder if my problem
stems from deriving virtually all of the documents from a
single document via "Save As".) Are there methods
whereby I can (a) avoid having to close Word each time
before adding a password or adding the desired VBA to the
Word Main Merge docs or (b)add a password or the above-
described VBA to all of the relevant Word Main Merge docs
at once.

I hope my questions make sense.

Thank you in advance.

Jim
 
W

Word Heretic

G'day "Jim" <[email protected]>,

Wow - what a lot of questions :)

Comments are inline.


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Jim reckoned:
I believe I created some confusion by using the wrong
terminology. I don't think I'm working with any *.dot
files and so I should not have used the term "template".

Correct :) This clarifies some of your issues enormously :)
Rather, I am working with 40+ Word 2000 documents (a.k.a.
main merge documents?), linked to an Access 2000 db, that
contain merge fields and Word logic fields. The
documents at issue are these "main merge documents"
and the resulting merged documents, all of which, as I
understand it, are *.doc files.
The "main merge
documents" are opened via corresponding command button in
Access 2000.

Righto. So Access opens up an EXISTING document, does some merge
tricky, then a save as a to create a NEW document.

I wish to place VBA in each of the "main
merge documents" that will cause them to open, merge into
a new document, and then close, leaving only the new
document open. (I have received help with the precise
code to use.) I have recently learned that any code
associated with each of the "main merge documents" will
not be associated with the new merged documents.

Correct. You have to manually copy the codemodule across from inside
the vbproject.vbcomponents collection.
I want
to keep users from accessing the VBA for any "main merge"
documents. I have experimented with a few of the "main
merge documents", adding appropriate VBA and then
attempting to add protection via the VB editor, by right
clicking on the project and then clicking on "project
properties". Often, with respect to the "main merge
documents" I tried this with, I received
the message "Project protected. Project is unviewable".


AH HA! Righto, you have totally the wrong method. Here's what you have
to do.

Create a template for use only by your mail merge documents, whether
EXISTING or NEW (to give two sensible names to your thingies :) ).

Manually (or use the batch file processor from
www.mvps.org/word/FAQs/index.htm) attach that template to all EXISTING
files. If you ever CREATE a new document, use the templates parm to
attach this template to your documents.

Protect the vbproject and distribute to those users who need to create
NEW documents.

This template will then be available for the NEW files as they inherit
the settings from the EXISTING files.

However, after working at it, I learned that I can access
the "project properties" for the main merge Word
documents so long as I do the following: Open one
document at a time from Access, using the appropriate
command button (but do not open a 2d document); do not
open the documents via Word or by double clicking on
their icons; after completing work on one document, it is
necessary to close not just the document, but also Word,
before opening the next document. Sounds crazy and, no
doubt, I messed something up along the way, but this is
the only solution I have found. (I wonder if my problem
stems from deriving virtually all of the documents from a
single document via "Save As".)

This is correct and you aren't crazy. Access is running the show, so
it is controlling the Word linkage. You probably have some access vars
set the original word document that are holding their settings to the
original document. I'd need to see the Access code to suggest where
and how to release / re-acquire your document based variables.

Are there methods
whereby I can (a) avoid having to close Word each time
before adding a password or adding the desired VBA to the
Word Main Merge docs or (b)add a password or the above-
described VBA to all of the relevant Word Main Merge docs
at once.

You should be able to release any relevant vars. However, it is also
possible that just a simple oWordApp.DoEvents might solve your problem
as your code isnt allowing Word any timeshare to resolve the various
events that occur on opening, saving and closing your document.
I hope my questions make sense.

Actually, in the end they did :)
Thank you in advance.

Jim

No probs - good luck.
 

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