Hi Bo,
The problem is that if the user is on High security, no VBA code in the
document will run at all. Therefore there is no way of prevnting the user
from doing anything they want to the document.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
> HI !
>
[quoted text clipped - 20 lines]
>
> Thierry Borgne
Ed - 12 Apr 2005 14:02 GMT
Bo:
You're going to have to rely on the user to close the document without
saving any changes. What I did was create a single large table cell with
the message that if the user can read this, they need to close the doc and
change their macro security settings. Then, in the document VBA, I have
Private Sub Document_Open()
Dim docThis As Document
Set docThis = ActiveDocument
' Collapse table cell with warning
docThis.Tables(1).Rows(1).SetHeight RowHeight:=0.5, _
HeightRule:=wdRowHeightExactly
' Call form to start other processes
StartUp.Show
DoEvents
' Undo collapse table
docThis.Undo 1
Application.Quit
End Sub
As you notice, I use a UserForm, and it interacts with other documents; this
initial doc is not really used except to begin the process. So this
approach may not work as well for you.
Ed
> Hi Bo,
>
[quoted text clipped - 26 lines]
> >
> > Thierry Borgne
What you could do is put your real document content into an AutoText entry.
Then replace the content with a message that tells the user how to reset
security level and urging them to do so and to then enable the macros upon
reopening the document.
Have an AutoNew macro that replaces the message with your actual content.
Have an AutoOpen macro that runs the AutoNew macro.
Then distribute the template with instructions to put it in the user
templates folder or the workgroup templates folder. (These instructions
could also be a part of your disappearing instructions if you want.)
This is not secure and is far from idiot-proof but it may go a long way in
the direction you are trying to travel.

Signature
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
> HI !
>
[quoted text clipped - 20 lines]
>
> Thierry Borgne
Thanks for your answers!
Finally I'm going to save the doc with "reading only" and with
messages in the body instead of form's text fields to explain it's not
possible to fill the form without checking security level !
And in the sub "document_open" I will test the protect level and if
read only I will check it to the "form" level!
Not so bad to solve the problem !
Thierry Borgne