selecting form fields in a protected form 
Author Message
 selecting form fields in a protected form

I have a protected form in Word 2000 that includes a table with two form fields
in each cell.  Once the user enters data in the second form field, the user can
hit Tab or any of the arrow keys and the cursor will move down to the next row
(in the same column).  

The macro I created works fine, except it doesn't automatically select the entire
form field (the first field).  This makes it difficult for the user to edit this
field.

This is the code I'm using:

Public Sub Down()
    Selection.MoveDown unit:=wdLine, Count:=1
    Selection.HomeKey unit:=wdLine, Extend:=wdMove
    Selection.Expand unit:=wdCharacter
End Sub

Can you tell me how to select the entire form field?  I've tried many variations
without any luck.

Thank you.



Mon, 19 May 2003 03:00:00 GMT  
 selecting form fields in a protected form

Hi Barb,

Quote:
>>    Selection.MoveDown unit:=wdLine, Count:=1
>>    Selection.HomeKey unit:=wdLine, Extend:=wdMove
>>    Selection.Expand unit:=wdCharacter

replace by

With Selection
    .MoveDown unit:=wdLine, Count:=1
    .HomeKey wdLine, wdExtend
End With

Success,
Perry



I have a protected form in Word 2000 that includes a table with two form
fields
in each cell.  Once the user enters data in the second form field, the user
can
hit Tab or any of the arrow keys and the cursor will move down to the next
row
(in the same column).

The macro I created works fine, except it doesn't automatically select the
entire
form field (the first field).  This makes it difficult for the user to edit
this
field.

This is the code I'm using:

Public Sub Down()
    Selection.MoveDown unit:=wdLine, Count:=1
    Selection.HomeKey unit:=wdLine, Extend:=wdMove
    Selection.Expand unit:=wdCharacter
End Sub

Can you tell me how to select the entire form field?  I've tried many
variations
without any luck.

Thank you.



Mon, 19 May 2003 03:00:00 GMT  
 selecting form fields in a protected form
Thanks, Perry.  

I tried your code, but it doesn't move down the column, now it goes across the
row.

Quote:
-----Original Message-----

Hi Barb,

>>    Selection.MoveDown unit:=wdLine, Count:=1
>>    Selection.HomeKey unit:=wdLine, Extend:=wdMove
>>    Selection.Expand unit:=wdCharacter

replace by

With Selection
    .MoveDown unit:=wdLine, Count:=1
    .HomeKey wdLine, wdExtend
End With

Success,
Perry



I have a protected form in Word 2000 that includes a table with two form
fields
in each cell.  Once the user enters data in the second form field, the user
can
hit Tab or any of the arrow keys and the cursor will move down to the next
row
(in the same column).

The macro I created works fine, except it doesn't automatically select the
entire
form field (the first field).  This makes it difficult for the user to edit
this
field.

This is the code I'm using:

Public Sub Down()
    Selection.MoveDown unit:=wdLine, Count:=1
    Selection.HomeKey unit:=wdLine, Extend:=wdMove
    Selection.Expand unit:=wdCharacter
End Sub

Can you tell me how to select the entire form field?  I've tried many
variations
without any luck.

Thank you.

.



Mon, 19 May 2003 03:00:00 GMT  
 selecting form fields in a protected form
Hi Barb

Protected document, ahhh.
How ignorant, I missed this one.
Was far too simple of course ... ;-)

Nope, you will have to unprotect your document here:

Application.ScreenUpdating = False
ActiveDocument.Unprotect
With Selection
    .MoveDown unit:=wdLine, Count:=1
    .HomeKey wdLine, wdExtend
End With
ActiveDocument.Protect
Application.ScreenUpdating = True
End Sub

This user will  not even notice.
Note: your password settings !

Success,



Thanks, Perry.

I tried your code, but it doesn't move down the column, now it goes across
the
row.

Quote:
-----Original Message-----

Hi Barb,

>>    Selection.MoveDown unit:=wdLine, Count:=1
>>    Selection.HomeKey unit:=wdLine, Extend:=wdMove
>>    Selection.Expand unit:=wdCharacter

replace by

With Selection
    .MoveDown unit:=wdLine, Count:=1
    .HomeKey wdLine, wdExtend
End With

Success,
Perry



I have a protected form in Word 2000 that includes a table with two form
fields
in each cell.  Once the user enters data in the second form field, the user
can
hit Tab or any of the arrow keys and the cursor will move down to the next
row
(in the same column).

The macro I created works fine, except it doesn't automatically select the
entire
form field (the first field).  This makes it difficult for the user to edit
this
field.

This is the code I'm using:

Public Sub Down()
    Selection.MoveDown unit:=wdLine, Count:=1
    Selection.HomeKey unit:=wdLine, Extend:=wdMove
    Selection.Expand unit:=wdCharacter
End Sub

Can you tell me how to select the entire form field?  I've tried many
variations
without any luck.

Thank you.

.



Mon, 19 May 2003 03:00:00 GMT  
 selecting form fields in a protected form
Perry,

Thanks a bunch. I'll try that out.

Barb

Quote:
-----Original Message-----

Hi Barb

Protected document, ahhh.
How ignorant, I missed this one.
Was far too simple of course ... ;-)

Nope, you will have to unprotect your document here:

Application.ScreenUpdating = False
ActiveDocument.Unprotect
With Selection
    .MoveDown unit:=wdLine, Count:=1
    .HomeKey wdLine, wdExtend
End With
ActiveDocument.Protect
Application.ScreenUpdating = True
End Sub

This user will  not even notice.
Note: your password settings !

Success,



Thanks, Perry.

I tried your code, but it doesn't move down the column, now it goes across
the
row.

-----Original Message-----

Hi Barb,

>>    Selection.MoveDown unit:=wdLine, Count:=1
>>    Selection.HomeKey unit:=wdLine, Extend:=wdMove
>>    Selection.Expand unit:=wdCharacter

replace by

With Selection
    .MoveDown unit:=wdLine, Count:=1
    .HomeKey wdLine, wdExtend
End With

Success,
Perry



I have a protected form in Word 2000 that includes a table with two form
fields
in each cell.  Once the user enters data in the second form field, the user
can
hit Tab or any of the arrow keys and the cursor will move down to the next
row
(in the same column).

The macro I created works fine, except it doesn't automatically select the
entire
form field (the first field).  This makes it difficult for the user to edit
this
field.

This is the code I'm using:

Public Sub Down()
    Selection.MoveDown unit:=wdLine, Count:=1
    Selection.HomeKey unit:=wdLine, Extend:=wdMove
    Selection.Expand unit:=wdCharacter
End Sub

Can you tell me how to select the entire form field?  I've tried many
variations
without any luck.

Thank you.

..

.



Mon, 19 May 2003 03:00:00 GMT  
 selecting form fields in a protected form
Hi Barb,

One more thing in addition to Perry's advice.

The line:
    ActiveDocument.Protect
will generate an error because it's not entirely complet

Try:
   ActiveDocument.Protect Type:=wdAllowOnlyFormFields _
               noreset:=true

Hope this helps,
regards,
Astrid

Please post replies to the newsgroup so that other readers can contribute or
benefit.

Visit the MVP Word FAQ site at http://www.mvps.org/word/
For direct access to all Microsoft newsgroups:



Perry,

Thanks a bunch. I'll try that out.

Barb

Quote:
-----Original Message-----

Hi Barb

Protected document, ahhh.
How ignorant, I missed this one.
Was far too simple of course ... ;-)

Nope, you will have to unprotect your document here:

Application.ScreenUpdating = False
ActiveDocument.Unprotect
With Selection
    .MoveDown unit:=wdLine, Count:=1
    .HomeKey wdLine, wdExtend
End With
ActiveDocument.Protect
Application.ScreenUpdating = True
End Sub

This user will  not even notice.
Note: your password settings !

Success,



Thanks, Perry.

I tried your code, but it doesn't move down the column, now it goes across
the
row.

-----Original Message-----

Hi Barb,

>>    Selection.MoveDown unit:=wdLine, Count:=1
>>    Selection.HomeKey unit:=wdLine, Extend:=wdMove
>>    Selection.Expand unit:=wdCharacter

replace by

With Selection
    .MoveDown unit:=wdLine, Count:=1
    .HomeKey wdLine, wdExtend
End With

Success,
Perry



I have a protected form in Word 2000 that includes a table with two form
fields
in each cell.  Once the user enters data in the second form field, the user
can
hit Tab or any of the arrow keys and the cursor will move down to the next
row
(in the same column).

The macro I created works fine, except it doesn't automatically select the
entire
form field (the first field).  This makes it difficult for the user to edit
this
field.

This is the code I'm using:

Public Sub Down()
    Selection.MoveDown unit:=wdLine, Count:=1
    Selection.HomeKey unit:=wdLine, Extend:=wdMove
    Selection.Expand unit:=wdCharacter
End Sub

Can you tell me how to select the entire form field?  I've tried many
variations
without any luck.

Thank you.

..

.



Mon, 19 May 2003 03:00:00 GMT  
 selecting form fields in a protected form
 Typo  )-:

Forgot the comma behind the wdAllowOnlyFormFields:

ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
                noreset:=true

Hope this helps,
regards,
Astrid

Please post replies to the newsgroup so that other readers can contribute or
benefit.

Visit the MVP Word FAQ site at http://www.mvps.org/word/
For direct access to all Microsoft newsgroups:



Quote:
> Hi Barb,

> One more thing in addition to Perry's advice.

> The line:
>     ActiveDocument.Protect
> will generate an error because it's not entirely complet

> Try:
>    ActiveDocument.Protect Type:=wdAllowOnlyFormFields _
>                noreset:=true

> Hope this helps,
> regards,
> Astrid

> Please post replies to the newsgroup so that other readers can contribute
or
> benefit.

> Visit the MVP Word FAQ site at http://www.mvps.org/word/
> For direct access to all Microsoft newsgroups:



> Perry,

> Thanks a bunch. I'll try that out.

> Barb

> -----Original Message-----
> Hi Barb

> Protected document, ahhh.
> How ignorant, I missed this one.
> Was far too simple of course ... ;-)

> Nope, you will have to unprotect your document here:

> Application.ScreenUpdating = False
> ActiveDocument.Unprotect
> With Selection
>     .MoveDown unit:=wdLine, Count:=1
>     .HomeKey wdLine, wdExtend
> End With
> ActiveDocument.Protect
> Application.ScreenUpdating = True
> End Sub

> This user will  not even notice.
> Note: your password settings !

> Success,



> Thanks, Perry.

> I tried your code, but it doesn't move down the column, now it goes across
> the
> row.

> -----Original Message-----

> Hi Barb,

> >>    Selection.MoveDown unit:=wdLine, Count:=1
> >>    Selection.HomeKey unit:=wdLine, Extend:=wdMove
> >>    Selection.Expand unit:=wdCharacter

> replace by

> With Selection
>     .MoveDown unit:=wdLine, Count:=1
>     .HomeKey wdLine, wdExtend
> End With

> Success,
> Perry


bericht

> I have a protected form in Word 2000 that includes a table with two form
> fields
> in each cell.  Once the user enters data in the second form field, the
user
> can
> hit Tab or any of the arrow keys and the cursor will move down to the next
> row
> (in the same column).

> The macro I created works fine, except it doesn't automatically select the
> entire
> form field (the first field).  This makes it difficult for the user to
edit
> this
> field.

> This is the code I'm using:

> Public Sub Down()
>     Selection.MoveDown unit:=wdLine, Count:=1
>     Selection.HomeKey unit:=wdLine, Extend:=wdMove
>     Selection.Expand unit:=wdCharacter
> End Sub

> Can you tell me how to select the entire form field?  I've tried many
> variations
> without any luck.

> Thank you.

> ..

> .



Mon, 19 May 2003 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Protected Forms and Text Form Fields

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

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

4. Protecting custom Form fields

5. Filling in Form Fields while Protected

6. Protect the form when exiting a field

7. Need help w/Protected document with form text fields and check boxes

8. Protected Form...Make field required

9. Insert File Into Protected Form Field?

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

11. userform protect unprotect, form fields problem

12. Userfrom, protect-unprotect, form fields missing

 

 
Powered by phpBB® Forum Software