I'm trying to set up a form in Word 2002. I want to set up the form such
that when a user enters a number in one place in the document, the same
number is automatically entered in a second location. I've tried running a
macro on exit from the first text form field that copies then pastes the
number to the other form field below, but I get an error message (Microsoft
Visual Basic. Run-time error 4605: This method or property is not available
because the obfect refers to a protected area of the document). I tried it
again, by taking out the second form field, and just trying to paste the
number to a specific spot, but I get the same error message.
What am I doing wrong??

Re: How to set up macro that copies text to another place in same docu by Greg

Greg
Fri Aug 04 13:15:28 CDT 2006

You don't need a macro. Let's say your source field is "Text1."
Unprotect the document and double click the source field. Verify the
name "Text1" and check "Calculate on exit." Close the dialog box. Go
where you want this source field repeated. Press CTRL+F9 in the { }
that appear, type Text1. Right click the field and select toggle field
code. Protect the document and you are done.


Nevets wrote:
> I'm trying to set up a form in Word 2002. I want to set up the form such
> that when a user enters a number in one place in the document, the same
> number is automatically entered in a second location. I've tried running a
> macro on exit from the first text form field that copies then pastes the
> number to the other form field below, but I get an error message (Microsoft
> Visual Basic. Run-time error 4605: This method or property is not available
> because the obfect refers to a protected area of the document). I tried it
> again, by taking out the second form field, and just trying to paste the
> number to a specific spot, but I get the same error message.
> What am I doing wrong??


Re: How to set up macro that copies text to another place in same by Nevets

Nevets
Mon Aug 07 18:50:02 CDT 2006

Thanks for the help, Greg.....so far!!
Two questions:
It's working so far, but a minor problem that I'd like to solve is that I'd
like the text size in the second place (the field result??) to be smaller
that the source field. Is there any way to do that?
Second, since I like to understand what I'm doing, what does the last step
do? What am I doing when I "Toggle Field Code".

Again, Thanks.

"Greg Maxey" wrote:

> You don't need a macro. Let's say your source field is "Text1."
> Unprotect the document and double click the source field. Verify the
> name "Text1" and check "Calculate on exit." Close the dialog box. Go
> where you want this source field repeated. Press CTRL+F9 in the { }
> that appear, type Text1. Right click the field and select toggle field
> code. Protect the document and you are done.
>
>
> Nevets wrote:
> > I'm trying to set up a form in Word 2002. I want to set up the form such
> > that when a user enters a number in one place in the document, the same
> > number is automatically entered in a second location. I've tried running a
> > macro on exit from the first text form field that copies then pastes the
> > number to the other form field below, but I get an error message (Microsoft
> > Visual Basic. Run-time error 4605: This method or property is not available
> > because the obfect refers to a protected area of the document). I tried it
> > again, by taking out the second form field, and just trying to paste the
> > number to a specific spot, but I get the same error message.
> > What am I doing wrong??
>
>

Re: How to set up macro that copies text to another place in same by Greg

Greg
Mon Aug 07 19:11:00 CDT 2006

Enter the field braces as before { } inside the braces, type "Text1 \*
Charformat" (without the quotations). Select the "T" is "Text1" and format
it the size you want the result to display. Right click the field and
select toggle field code. Protect the document and you are done.

Toggle field code means to toggle the display on the screen between the
field code and the result of the field.

So if I had a form field text box bookmarked myName and wanted my name
repeated in a document, I would enter field codes like { myName } here and
{ myName } there. When I toggled the field code to display the results I
would see Greg here and Greg there. Or if we used your name we would see
Nevets here and Nevets there.

Good luck.



--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Nevets wrote:
> Thanks for the help, Greg.....so far!!
> Two questions:
> It's working so far, but a minor problem that I'd like to solve is
> that I'd like the text size in the second place (the field result??)
> to be smaller that the source field. Is there any way to do that?
> Second, since I like to understand what I'm doing, what does the last
> step do? What am I doing when I "Toggle Field Code".
>
> Again, Thanks.
>
> "Greg Maxey" wrote:
>
>> You don't need a macro. Let's say your source field is "Text1."
>> Unprotect the document and double click the source field. Verify the
>> name "Text1" and check "Calculate on exit." Close the dialog box.
>> Go where you want this source field repeated. Press CTRL+F9 in the
>> { } that appear, type Text1. Right click the field and select
>> toggle field code. Protect the document and you are done.
>>
>>
>> Nevets wrote:
>>> I'm trying to set up a form in Word 2002. I want to set up the
>>> form such that when a user enters a number in one place in the
>>> document, the same number is automatically entered in a second
>>> location. I've tried running a macro on exit from the first text
>>> form field that copies then pastes the number to the other form
>>> field below, but I get an error message (Microsoft Visual Basic.
>>> Run-time error 4605: This method or property is not available
>>> because the obfect refers to a protected area of the document). I
>>> tried it again, by taking out the second form field, and just
>>> trying to paste the number to a specific spot, but I get the same
>>> error message.
>>> What am I doing wrong??



Re: How to set up macro that copies text to another place in same by Nevets

Nevets
Tue Aug 08 07:23:56 CDT 2006

Thanks, Greg; your my hero.


"Greg Maxey" wrote:

> Enter the field braces as before { } inside the braces, type "Text1 \*
> Charformat" (without the quotations). Select the "T" is "Text1" and format
> it the size you want the result to display. Right click the field and
> select toggle field code. Protect the document and you are done.
>
> Toggle field code means to toggle the display on the screen between the
> field code and the result of the field.
>
> So if I had a form field text box bookmarked myName and wanted my name
> repeated in a document, I would enter field codes like { myName } here and
> { myName } there. When I toggled the field code to display the results I
> would see Greg here and Greg there. Or if we used your name we would see
> Nevets here and Nevets there.
>
> Good luck.
>
>
>
> --
> Greg Maxey/Word MVP
> See:
> http://gregmaxey.mvps.org/word_tips.htm
> For some helpful tips using Word.
>
>
> Nevets wrote:
> > Thanks for the help, Greg.....so far!!
> > Two questions:
> > It's working so far, but a minor problem that I'd like to solve is
> > that I'd like the text size in the second place (the field result??)
> > to be smaller that the source field. Is there any way to do that?
> > Second, since I like to understand what I'm doing, what does the last
> > step do? What am I doing when I "Toggle Field Code".
> >
> > Again, Thanks.
> >
> > "Greg Maxey" wrote:
> >
> >> You don't need a macro. Let's say your source field is "Text1."
> >> Unprotect the document and double click the source field. Verify the
> >> name "Text1" and check "Calculate on exit." Close the dialog box.
> >> Go where you want this source field repeated. Press CTRL+F9 in the
> >> { } that appear, type Text1. Right click the field and select
> >> toggle field code. Protect the document and you are done.
> >>
> >>
> >> Nevets wrote:
> >>> I'm trying to set up a form in Word 2002. I want to set up the
> >>> form such that when a user enters a number in one place in the
> >>> document, the same number is automatically entered in a second
> >>> location. I've tried running a macro on exit from the first text
> >>> form field that copies then pastes the number to the other form
> >>> field below, but I get an error message (Microsoft Visual Basic.
> >>> Run-time error 4605: This method or property is not available
> >>> because the obfect refers to a protected area of the document). I
> >>> tried it again, by taking out the second form field, and just
> >>> trying to paste the number to a specific spot, but I get the same
> >>> error message.
> >>> What am I doing wrong??
>
>
>