View Single Post
  #2   Report Post  
Dian D. Chapman, MVP
 
Posts: n/a
Default

What you'll need to do is write a VBA sub procedure that
unlocks/relocks the form. Then between the calls to toggle the
locking...you can either add a recorded Insert Picture procedure to
allow the user to enter the picture, or you can record on yourself and
leave the path/image as a variable (blank). You can then use an input
box or common dialog box call to allow the user to search for their
image at that point.

You might want to check out this TechTrax article which shows how to
record a macro to insert an image into letterhead. And the second one
shows how to capture information from a user. Finally, you can find
many more free forms tutorials on my site at the third URL:

Adding/Removing Stationery Logos Thru Automation
http://pubs.logicalexpressions.com/P...cle.asp?ID=528

Pass Repeated Information in a Word Document
http://www.computorcompanion.com/LPMArticle.asp?ID=224

Free Word AutoForm Tutorials
http://www.mousetrax.com/techpage.html#autoforms

To get you started, here's the Protection toggle sub procedure you can
use:

Sub ToggleFormLock()
'**********************
'PURPOSE
'quickly checks form state and toggles open/close Protection
' as needed to enter data.
'**********************

'if locked, unlock, else lock
If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then
ActiveDocument.Unprotect
Else
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
End If

End Sub

Hope this helps...

Dian D. Chapman, Technical Consultant
Microsoft MVP, MOS Certified
Editor/TechTrax Ezine

Free MS Tutorials: http://www.mousetrax.com/techtrax
Free Word eBook: http://www.mousetrax.com/books.html
Optimize your business docs: http://www.mousetrax.com/consulting
Learn VBA the easy way: http://www.mousetrax.com/techcourses.html


On Mon, 18 Apr 2005 13:01:01 -0700, "Wylie C"
wrote:

I have a table with some form and dropdown form fields in it. Of course, for
them to work properly the form must be protected. The problem and question I
have is that I also want to be able to put a picture in an unused blank cell
of the table but can't while it is protected. Can I do that and if so, how?

Thank you.