Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

VBA makes make doc read only but user's can still copy and paste images off of it.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Josh - 18 Jul 2007 21:49 GMT
I created a form template that once the user finishes filling out
saves itself on a network drive.  My problem is that during the
process, depending on what the user clicks on, a certain image will
appear on the form.  If yuou open the form after the VBA has ran you
have to put in a password if you want to modify the document in anyway
but this does not stop them from coping and pasting the image
somewhere else.  It is very important that this image is locked down.
Any help is great!

The code that inserts the image:

ActiveDocument.Bookmarks("sig").Range.InlineShapes.AddPicture _
FileName:="C:\PhyData\" & UserForm1.ComboBox2 & ".JPG", _
LinkToFile:=False, SaveWithDocument:=True

The code that locks the document:

Sub ReadOnlySet()
If ActiveDocument.ProtectionType = wdNoProtection Then
   ActiveDocument.Protect wdAllowOnlyReading, True, "123"
Else
   ActiveDocument.Unprotect "123"
   ActiveDocument.Protect wdAllowOnlyReading, True, "123"
End If
ActiveDocument.Save
End Sub
Graham Mayor - 19 Jul 2007 07:42 GMT
If you allow someone to see a document they can do what they like with it.
The password for forms functions only stops the *original* from being
edited. It does not stop copies being edited.There is no way to prevent
copying of *anything* you allow someone to see (or hear). If you were able
to do that the media industry alone would reward you beyond your wildest
dreams.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I created a form template that once the user finishes filling out
> saves itself on a network drive.  My problem is that during the
[quoted text clipped - 22 lines]
> ActiveDocument.Save
> End Sub
Josh - 19 Jul 2007 19:02 GMT
I guess you're right.  I'll have to find a solution outside of Word.
Graham Mayor - 20 Jul 2007 07:19 GMT
There is *no* possibility of a solution. That's the whole point. If you
allow someone to view it, it can be copied. The only way to prevent it from
being copied is not to let anyone see it.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I guess you're right.  I'll have to find a solution outside of Word.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.