Thanks Cindy. I was able to replace the default "ViewTaskpane" word command
with my custom macro, as you defined below.
However, after a document is protected, if you attempt to type in that
document, the protection task pane is automatically displayed and regardless
of which macros I redefine (viewtaskpane, ToolsProtectUnprotectDocument), I
have been unsuccessful in disabling the protection task pane from being
displayed when you press any key in a protected document. It's as if "on key
press event" is attached to the document (although I don't think I can set
this kind of event for a document, only a form).
So to recap, what I want to do is protect a document from being edited by
using Word's protection function. If a user tries to edit the document, I do
NOT want Word's protection task pane displayed -- I want to display my own
message instead or nothing at all.....
I look forward to hearing your reply Cindy.
> Hi =?Utf-8?B?a2xhdg==?=,
>
[quoted text clipped - 23 lines]
> 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- - 29 Mar 2005 21:50 GMT
Hi =?Utf-8?B?a2xhdg==?=,
> However, after a document is protected, if you attempt to type in that
> document, the protection task pane is automatically displayed and regardless
[quoted text clipped - 3 lines]
> press event" is attached to the document (although I don't think I can set
> this kind of event for a document, only a form).
I've never noticed anything of this sort. Could you
- tell me exactly which protection you've selected
- in which version of Word
- what's in such a protected document
so that I can try to duplicate? (Note: when I think of document protection, I
think "protect as a form". I know there are other kinds, but I have to
understand exactly what you're trying to do.)
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 :-)
klav - 30 Mar 2005 17:29 GMT
Cindy, I was using the the protection for making the file read only (no
changes). Believe it or not, it didn't occur to me until yesterday to try
making the file protected as a form -- my file is not a form in that there
are no user entry fields and I guess that is why it didn't occur to me to use
this option. This worked -- I no longer get the protection task pane.
Thanks for your help.
Now I have another problem that I cannot seem to solve. From another
application, I am opening a document in word and splitting it into two
documents and displaying the documents in print preview -- these files are
not being saved anywhere.
The user can switch between the preview of the two documents. I have a
button to exit gracefully which closes all appropriate documents without
saving (which is what I want) but if the user clicks on the window close icon
(X), no matter what I try, the save changes dialog is displayed. I want all
documents to close without displaying the "save changes" dialog box. I
cannot seem to do this. I have tried an autoclose macro, an autoexit macro, a
document close macro, an application close event but I keep getting prompted
if I want to save the changes. I'm using the following code but I have also
tried cycling through all open windows and specifically close each one
without saving and this doesn't work either. Can you help?????
Application.Quit savechanges:=wdDoNotSaveChanges
> Hi =?Utf-8?B?a2xhdg==?=,
>
[quoted text clipped - 22 lines]
> This reply is posted in the Newsgroup; please post any follow question or reply
> in the newsgroup and not by e-mail :-)
Klaus Linke - 31 Mar 2005 01:53 GMT
> I want all documents to close without displaying the "save changes" dialog box.
Hi Klav,
Have you already tried myDoc.Saved=True?
Greetings,
Klaus