Reply
 
Thread Tools Display Modes
  #1   Report Post  
Wylie C
 
Posts: n/a
Default Insert picture in a form table

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.
  #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.


  #3   Report Post  
Jay Freedman
 
Posts: n/a
Default

I noticed several requests over the last month or so for a method of
inserting a picture into a protected form. I've prepared a sample
template with the macro code required to do it. You can download it
from http://jay-freedman.info/form_picture.zip. If you have any
questions about it, please post here or email me at the address in the
template.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

On Thu, 21 Apr 2005 17:45:24 -0500, "Dian D. Chapman, MVP"
wrote:

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.



--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
  #4   Report Post  
Dian D. Chapman, MVP
 
Posts: n/a
Default

HA...I noticed the same thing, Jay...and was working on an article,
too. ;-)

Dian ~

On Sun, 01 May 2005 18:11:39 -0400, Jay Freedman
wrote:

I noticed several requests over the last month or so for a method of
inserting a picture into a protected form. I've prepared a sample
template with the macro code required to do it. You can download it
from http://jay-freedman.info/form_picture.zip. If you have any
questions about it, please post here or email me at the address in the
template.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

On Thu, 21 Apr 2005 17:45:24 -0500, "Dian D. Chapman, MVP"
wrote:

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.


  #5   Report Post  
Jay Freedman
 
Posts: n/a
Default

You're welcome to use the template if you want, or send me what you
have and I can finish the article. Happy to do it!

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

On Sun, 01 May 2005 20:02:16 -0500, "Dian D. Chapman, MVP"
wrote:

HA...I noticed the same thing, Jay...and was working on an article,
too. ;-)

Dian ~

On Sun, 01 May 2005 18:11:39 -0400, Jay Freedman
wrote:

I noticed several requests over the last month or so for a method of
inserting a picture into a protected form. I've prepared a sample
template with the macro code required to do it. You can download it
from http://jay-freedman.info/form_picture.zip. If you have any
questions about it, please post here or email me at the address in the
template.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

On Thu, 21 Apr 2005 17:45:24 -0500, "Dian D. Chapman, MVP"
wrote:

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.




  #6   Report Post  
Dian D. Chapman, MVP
 
Posts: n/a
Default

Well...since TechTrax is on hiatus, it's more of an outline for now.
But when it's time to make it more...I'll be in touch if you'd care to
share the spotlight with me so I can openly thank you for your sample
and code?

In the meantime...DON'T wait for me cos' I'm trying not to think much
about publishing right now since we're on break. So if you toss it to
MVPs.org, I'll like to it if that's cool.

We'll talk. ;-)

And thanks!

Dian ~

On Sun, 01 May 2005 21:35:45 -0400, Jay Freedman
wrote:

You're welcome to use the template if you want, or send me what you
have and I can finish the article. Happy to do it!


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create an insert picture button/control for word forms? dennis34 Microsoft Word Help 1 September 6th 06 07:06 PM
Table AutoFormats vs. Table Styles confusion Tony Jollans Tables 5 March 6th 05 08:18 PM
How do I insert Excel data as a Word table and stay within margins Fritz Tables 1 February 6th 05 09:39 AM
Using VBA to Add Table Row to Form Table KLSiegel Tables 1 November 25th 04 04:26 AM
How do I insert a picture into a cell of a table? MALIrish Tables 1 November 2nd 04 05:08 AM


All times are GMT +1. The time now is 03:10 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"