J
Josh
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
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