Hello Timo,
As far as I know, there is no event that triggers when the document gets
modified. And I am still not very clear about what the exact objective you
want to achieve. Currently, I have the following two assumptions. Would you
mind clarifying it, and then we can have a better discussion.
1.Open the document as read-only.
In this case, the document can be edited, but when we try to save the
document, the Word will ask us to save the document as another one. That is
to say, the original document does not change. We can achieve this by
setting the Documents.Open()'s third parameter ReadOnly to true. Note this
argument doesn't override the read-only recommended setting on a saved
document. For example, if a document has been saved with read-only
recommended turned on, setting the ReadOnly argument to False will not
cause the file to be opened as read/write.
You can get a detailed information in this MSDN document,
http://msdn.microsoft.com/en-us/library/bb216319.aspx
2.Protect the document so that the end user cannot edit it.
Actually, when we call Document.Protect, we can pass a string type
parameter as the password. If someone wants to unprotect it later, he must
know the password. Consequently, we do not need to be worry about the end
user will unprotect it by themselves. The VB version Code looks like,
ActiveDocument.Protect(Type:=wdAllowOnlyReading, NoReset:=False,
Password:="851230", UseIRM:=False, EnforceStyleLock:=False)
Please let me know if the above resolves your issue. We are looking forward
to your reply.
Have a nice day, Timo!
Best regards,
Ji Zhou (
[email protected], remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.