Need help w/Protected document with form text fields and check boxes 
Author Message
 Need help w/Protected document with form text fields and check boxes

Using Word 97

Using VBA, I am trying to run a macro from Excel that will place Excel cell
values in form fields in a protected word document and also select or
de-select a check box on the form depending on the value of a certain Excel
cell. Because the document is protected, it doesn't want to cooperate. Is
there a way to insert data into the form fields and checkboxes of a
protected document? What is the correct syntax?

Any help would be greatly appreciated.

Scott McCullough



Tue, 01 Apr 2003 03:00:00 GMT  
 Need help w/Protected document with form text fields and check boxes
Hi Scott,

Quote:
> Is
> there a way to insert data into the form fields and checkboxes of a
> protected document?

    o_doc.FormFields("FieldName").Result = myStringVar
    o_doc.FormFields("CheckboxName").Checkbox.Value = True 'or False

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)



Fri, 04 Apr 2003 03:00:00 GMT  
 Need help w/Protected document with form text fields and check boxes
Scott,

Take a look at the template you can download from Joseph Freedman's site

http://jjfreedman.homestead.com/field_template.html

It has some excellent code on protecting / unprotecting a document and
resetting to the original condition.

--
Charles Kenyon

Word New User FAQ & Web Directory:
http://www.addbalance.com/word

Legal Users Guide (modified)
http://www.addbalance.com/usersguide
 --------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.



Quote:
> Hi Scott,

> > Is
> > there a way to insert data into the form fields and checkboxes of a
> > protected document?

>     o_doc.FormFields("FieldName").Result = myStringVar
>     o_doc.FormFields("CheckboxName").Checkbox.Value = True 'or False

> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister
> http://www.mvps.org/word
> http://go.compuserve.com/MSOfficeForum

> This reply is posted in the Newsgroup; please post any follow
> question or reply in the newsgroup and not by e-mail :-)



Sat, 05 Apr 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Spell check text boxes on a protected document

2. Repost: Stop up\down cursor keys moving between (text) form fields in a protected document

3. Protected Forms and Text Form Fields

4. Loss of form field text after unprotecting and protecting a form

5. Protected document does not allow to insert text in fields

6. URGENT: Error when assigning long strings to Form Fields in a protected Word document

7. Protect list box without protecting entire document?

8. Problem when unprotecting a document with form field text fields

9. Entering text in form field of locked document pushes text on same line

10. Check boxes in User Form vs Document

11. Document Fields and Text Boxes

12. passing variables from a text box to a document.write text box

 

 
Powered by phpBB® Forum Software