FIELDS

  • Thread starter Thread starter George Lawshe
  • Start date Start date
G

George Lawshe

I have a document that I want to put in two FIELDS, the first field is for a
number that I will manually put in, the second field is a formula that refers
to a VBA code to write out the figure I put in in field 1. See example below.
I have done this in EXCEL and it works great. I think I figured out field,
but I do not know how to make the field or how to refer to it from field 2.
Your help would be appreciated.

Field 1 $141.47

Field 2 One Hundred Forty One and......47/100 Dollars

George
 
Here's one way to do it:

1. For Field 1, press Ctrl+F9 and, between the field braces, type
MacroButton NoMacro [Type amount here].

2. Format Field 1 with a *character* style that you have created for the
purpose (if you don't know how to do that, see
http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm). Let's call it Amount for
the sake of this example.

3. For Field 2, press Ctrl+F9 and type StyleRef "Amount" \*DollarText \*
FirstCap. Type "Dollars" after the field.

4. After typing the amount into Field 1, you'll have to manually update
Field 2 (with F9) unless it's in the header or footer.

You could probably accomplish the same thing by bookmarking the amount you
enter and using a REF field (with the same formatting switches) to pick it
up.
 
Suzanne

This what I did:

Field 1: { MacroButton NoMacro }
I am using Word 2003 so I went to New Styles Box and set up a new Style
Amount, I then High Lighted the macro and using the drop down formatting box
with Normal in it I applied the style.

Field 2: { StyleRef "Amount" \*DollarText \* FirstCap } Dollars

Then I get confused since I have never done this, When, where and how do
enter the Dollar Amount. I guess I know how, just when and where. Maybe you
could show in the example above $25.87.

Then do i put my cursor in field 2 an press F9?

Thanks
George

Suzanne S. Barnhill said:
Here's one way to do it:

1. For Field 1, press Ctrl+F9 and, between the field braces, type
MacroButton NoMacro [Type amount here].

2. Format Field 1 with a *character* style that you have created for the
purpose (if you don't know how to do that, see
http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm). Let's call it Amount for
the sake of this example.

3. For Field 2, press Ctrl+F9 and type StyleRef "Amount" \*DollarText \*
FirstCap. Type "Dollars" after the field.

4. After typing the amount into Field 1, you'll have to manually update
Field 2 (with F9) unless it's in the header or footer.

You could probably accomplish the same thing by bookmarking the amount you
enter and using a REF field (with the same formatting switches) to pick it
up.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
I have a document that I want to put in two FIELDS, the first field is for
a
number that I will manually put in, the second field is a formula that
refers
to a VBA code to write out the figure I put in in field 1. See example
below.
I have done this in EXCEL and it works great. I think I figured out
field,
but I do not know how to make the field or how to refer to it from field
2.
Your help would be appreciated.

Field 1 $141.47

Field 2 One Hundred Forty One and......47/100 Dollars

George
 
You need to add some prompt text to your MacroButton field. My suggested
version was:

{ MacroButton NoMacro [Type amount here] }

When field codes are toggled to display field results, you'll see [Type
amount here] for Field 1 and nothing for Field 2. Click anywhere in Field 1
and type your amount. Then select all the text and press F9; the formatted
amount will appear in place of Field 2.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
Suzanne

This what I did:

Field 1: { MacroButton NoMacro }
I am using Word 2003 so I went to New Styles Box and set up a new Style
Amount, I then High Lighted the macro and using the drop down formatting
box
with Normal in it I applied the style.

Field 2: { StyleRef "Amount" \*DollarText \* FirstCap } Dollars

Then I get confused since I have never done this, When, where and how do
enter the Dollar Amount. I guess I know how, just when and where. Maybe
you
could show in the example above $25.87.

Then do i put my cursor in field 2 an press F9?

Thanks
George

Suzanne S. Barnhill said:
Here's one way to do it:

1. For Field 1, press Ctrl+F9 and, between the field braces, type
MacroButton NoMacro [Type amount here].

2. Format Field 1 with a *character* style that you have created for the
purpose (if you don't know how to do that, see
http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm). Let's call it Amount
for
the sake of this example.

3. For Field 2, press Ctrl+F9 and type StyleRef "Amount" \*DollarText \*
FirstCap. Type "Dollars" after the field.

4. After typing the amount into Field 1, you'll have to manually update
Field 2 (with F9) unless it's in the header or footer.

You could probably accomplish the same thing by bookmarking the amount
you
enter and using a REF field (with the same formatting switches) to pick
it
up.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
I have a document that I want to put in two FIELDS, the first field is
for
a
number that I will manually put in, the second field is a formula that
refers
to a VBA code to write out the figure I put in in field 1. See example
below.
I have done this in EXCEL and it works great. I think I figured out
field,
but I do not know how to make the field or how to refer to it from
field
2.
Your help would be appreciated.

Field 1 $141.47

Field 2 One Hundred Forty One and......47/100 Dollars

George
 
Suzanne
I think I did exactly as you suggested and I get an Error Message



34.78


Error! Unknown switch argument. Dollars

Thanks
George


Suzanne S. Barnhill said:
You need to add some prompt text to your MacroButton field. My suggested
version was:

{ MacroButton NoMacro [Type amount here] }

When field codes are toggled to display field results, you'll see [Type
amount here] for Field 1 and nothing for Field 2. Click anywhere in Field 1
and type your amount. Then select all the text and press F9; the formatted
amount will appear in place of Field 2.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
Suzanne

This what I did:

Field 1: { MacroButton NoMacro }
I am using Word 2003 so I went to New Styles Box and set up a new Style
Amount, I then High Lighted the macro and using the drop down formatting
box
with Normal in it I applied the style.

Field 2: { StyleRef "Amount" \*DollarText \* FirstCap } Dollars

Then I get confused since I have never done this, When, where and how do
enter the Dollar Amount. I guess I know how, just when and where. Maybe
you
could show in the example above $25.87.

Then do i put my cursor in field 2 an press F9?

Thanks
George

Suzanne S. Barnhill said:
Here's one way to do it:

1. For Field 1, press Ctrl+F9 and, between the field braces, type
MacroButton NoMacro [Type amount here].

2. Format Field 1 with a *character* style that you have created for the
purpose (if you don't know how to do that, see
http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm). Let's call it Amount
for
the sake of this example.

3. For Field 2, press Ctrl+F9 and type StyleRef "Amount" \*DollarText \*
FirstCap. Type "Dollars" after the field.

4. After typing the amount into Field 1, you'll have to manually update
Field 2 (with F9) unless it's in the header or footer.

You could probably accomplish the same thing by bookmarking the amount
you
enter and using a REF field (with the same formatting switches) to pick
it
up.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

I have a document that I want to put in two FIELDS, the first field is
for
a
number that I will manually put in, the second field is a formula that
refers
to a VBA code to write out the figure I put in in field 1. See example
below.
I have done this in EXCEL and it works great. I think I figured out
field,
but I do not know how to make the field or how to refer to it from
field
2.
Your help would be appreciated.

Field 1 $141.47

Field 2 One Hundred Forty One and......47/100 Dollars

George
 
The switch is \*dollartext not dollars!

{ StyleRef "Amount" \*DollarText \* FirstCap }

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


George said:
Suzanne
I think I did exactly as you suggested and I get an Error Message



34.78


Error! Unknown switch argument. Dollars

Thanks
George


Suzanne S. Barnhill said:
You need to add some prompt text to your MacroButton field. My
suggested version was:

{ MacroButton NoMacro [Type amount here] }

When field codes are toggled to display field results, you'll see
[Type amount here] for Field 1 and nothing for Field 2. Click
anywhere in Field 1 and type your amount. Then select all the text
and press F9; the formatted amount will appear in place of Field 2.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
Suzanne

This what I did:

Field 1: { MacroButton NoMacro }
I am using Word 2003 so I went to New Styles Box and set up a new
Style Amount, I then High Lighted the macro and using the drop down
formatting box
with Normal in it I applied the style.

Field 2: { StyleRef "Amount" \*DollarText \* FirstCap } Dollars

Then I get confused since I have never done this, When, where and
how do enter the Dollar Amount. I guess I know how, just when and
where. Maybe you
could show in the example above $25.87.

Then do i put my cursor in field 2 an press F9?

Thanks
George

:

Here's one way to do it:

1. For Field 1, press Ctrl+F9 and, between the field braces, type
MacroButton NoMacro [Type amount here].

2. Format Field 1 with a *character* style that you have created
for the purpose (if you don't know how to do that, see
http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm). Let's call it
Amount for
the sake of this example.

3. For Field 2, press Ctrl+F9 and type StyleRef "Amount"
\*DollarText \* FirstCap. Type "Dollars" after the field.

4. After typing the amount into Field 1, you'll have to manually
update Field 2 (with F9) unless it's in the header or footer.

You could probably accomplish the same thing by bookmarking the
amount you
enter and using a REF field (with the same formatting switches) to
pick it
up.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

message I have a document that I want to put in two FIELDS, the first
field is for
a
number that I will manually put in, the second field is a formula
that refers
to a VBA code to write out the figure I put in in field 1. See
example below.
I have done this in EXCEL and it works great. I think I figured
out field,
but I do not know how to make the field or how to refer to it from
field
2.
Your help would be appreciated.

Field 1 $141.47

Field 2 One Hundred Forty One and......47/100 Dollars

George
 
Make sure you don't have "Dollars" inside the field braces (I don't think
you have), but I didn't have any problem using \*DollarText or \* FirstCap
with a StyleRef field.

I notice that there is a discrepancy in spacing between \*DollarText and \*
FirstCap. I'm guessing you pasted the switches directly from my post, and I
pasted them directly from Word's Help topic; this discrepancy therefore
comes directly from the Help topic, and in fact both the switches worked
okay in my test, so I don't think the spacing is the issue.

So I'm stumped.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
Suzanne
I think I did exactly as you suggested and I get an Error Message



34.78


Error! Unknown switch argument. Dollars

Thanks
George


Suzanne S. Barnhill said:
You need to add some prompt text to your MacroButton field. My suggested
version was:

{ MacroButton NoMacro [Type amount here] }

When field codes are toggled to display field results, you'll see [Type
amount here] for Field 1 and nothing for Field 2. Click anywhere in Field
1
and type your amount. Then select all the text and press F9; the
formatted
amount will appear in place of Field 2.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
Suzanne

This what I did:

Field 1: { MacroButton NoMacro }
I am using Word 2003 so I went to New Styles Box and set up a new Style
Amount, I then High Lighted the macro and using the drop down
formatting
box
with Normal in it I applied the style.

Field 2: { StyleRef "Amount" \*DollarText \* FirstCap } Dollars

Then I get confused since I have never done this, When, where and how
do
enter the Dollar Amount. I guess I know how, just when and where.
Maybe
you
could show in the example above $25.87.

Then do i put my cursor in field 2 an press F9?

Thanks
George

:

Here's one way to do it:

1. For Field 1, press Ctrl+F9 and, between the field braces, type
MacroButton NoMacro [Type amount here].

2. Format Field 1 with a *character* style that you have created for
the
purpose (if you don't know how to do that, see
http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm). Let's call it Amount
for
the sake of this example.

3. For Field 2, press Ctrl+F9 and type StyleRef "Amount" \*DollarText
\*
FirstCap. Type "Dollars" after the field.

4. After typing the amount into Field 1, you'll have to manually
update
Field 2 (with F9) unless it's in the header or footer.

You could probably accomplish the same thing by bookmarking the amount
you
enter and using a REF field (with the same formatting switches) to
pick
it
up.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

message
I have a document that I want to put in two FIELDS, the first field
is
for
a
number that I will manually put in, the second field is a formula
that
refers
to a VBA code to write out the figure I put in in field 1. See
example
below.
I have done this in EXCEL and it works great. I think I figured out
field,
but I do not know how to make the field or how to refer to it from
field
2.
Your help would be appreciated.

Field 1 $141.47

Field 2 One Hundred Forty One and......47/100 Dollars

George
 
Suzanne
It works great, I finally understood that I had to go to field 1 and insert
ampount then press F(, then highlight both Field 1 and Field2 and press F9,
it works, thanks a lot.
George

Suzanne S. Barnhill said:
Make sure you don't have "Dollars" inside the field braces (I don't think
you have), but I didn't have any problem using \*DollarText or \* FirstCap
with a StyleRef field.

I notice that there is a discrepancy in spacing between \*DollarText and \*
FirstCap. I'm guessing you pasted the switches directly from my post, and I
pasted them directly from Word's Help topic; this discrepancy therefore
comes directly from the Help topic, and in fact both the switches worked
okay in my test, so I don't think the spacing is the issue.

So I'm stumped.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
Suzanne
I think I did exactly as you suggested and I get an Error Message



34.78


Error! Unknown switch argument. Dollars

Thanks
George


Suzanne S. Barnhill said:
You need to add some prompt text to your MacroButton field. My suggested
version was:

{ MacroButton NoMacro [Type amount here] }

When field codes are toggled to display field results, you'll see [Type
amount here] for Field 1 and nothing for Field 2. Click anywhere in Field
1
and type your amount. Then select all the text and press F9; the
formatted
amount will appear in place of Field 2.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Suzanne

This what I did:

Field 1: { MacroButton NoMacro }
I am using Word 2003 so I went to New Styles Box and set up a new Style
Amount, I then High Lighted the macro and using the drop down
formatting
box
with Normal in it I applied the style.

Field 2: { StyleRef "Amount" \*DollarText \* FirstCap } Dollars

Then I get confused since I have never done this, When, where and how
do
enter the Dollar Amount. I guess I know how, just when and where.
Maybe
you
could show in the example above $25.87.

Then do i put my cursor in field 2 an press F9?

Thanks
George

:

Here's one way to do it:

1. For Field 1, press Ctrl+F9 and, between the field braces, type
MacroButton NoMacro [Type amount here].

2. Format Field 1 with a *character* style that you have created for
the
purpose (if you don't know how to do that, see
http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm). Let's call it Amount
for
the sake of this example.

3. For Field 2, press Ctrl+F9 and type StyleRef "Amount" \*DollarText
\*
FirstCap. Type "Dollars" after the field.

4. After typing the amount into Field 1, you'll have to manually
update
Field 2 (with F9) unless it's in the header or footer.

You could probably accomplish the same thing by bookmarking the amount
you
enter and using a REF field (with the same formatting switches) to
pick
it
up.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

message
I have a document that I want to put in two FIELDS, the first field
is
for
a
number that I will manually put in, the second field is a formula
that
refers
to a VBA code to write out the figure I put in in field 1. See
example
below.
I have done this in EXCEL and it works great. I think I figured out
field,
but I do not know how to make the field or how to refer to it from
field
2.
Your help would be appreciated.

Field 1 $141.47

Field 2 One Hundred Forty One and......47/100 Dollars

George
 
Glad you got it working.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
Suzanne
It works great, I finally understood that I had to go to field 1 and
insert
ampount then press F(, then highlight both Field 1 and Field2 and press
F9,
it works, thanks a lot.
George

Suzanne S. Barnhill said:
Make sure you don't have "Dollars" inside the field braces (I don't think
you have), but I didn't have any problem using \*DollarText or \*
FirstCap
with a StyleRef field.

I notice that there is a discrepancy in spacing between \*DollarText and
\*
FirstCap. I'm guessing you pasted the switches directly from my post, and
I
pasted them directly from Word's Help topic; this discrepancy therefore
comes directly from the Help topic, and in fact both the switches worked
okay in my test, so I don't think the spacing is the issue.

So I'm stumped.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

George Lawshe said:
Suzanne
I think I did exactly as you suggested and I get an Error Message



34.78


Error! Unknown switch argument. Dollars

Thanks
George


:

You need to add some prompt text to your MacroButton field. My
suggested
version was:

{ MacroButton NoMacro [Type amount here] }

When field codes are toggled to display field results, you'll see
[Type
amount here] for Field 1 and nothing for Field 2. Click anywhere in
Field
1
and type your amount. Then select all the text and press F9; the
formatted
amount will appear in place of Field 2.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

message
Suzanne

This what I did:

Field 1: { MacroButton NoMacro }
I am using Word 2003 so I went to New Styles Box and set up a new
Style
Amount, I then High Lighted the macro and using the drop down
formatting
box
with Normal in it I applied the style.

Field 2: { StyleRef "Amount" \*DollarText \* FirstCap } Dollars

Then I get confused since I have never done this, When, where and
how
do
enter the Dollar Amount. I guess I know how, just when and where.
Maybe
you
could show in the example above $25.87.

Then do i put my cursor in field 2 an press F9?

Thanks
George

:

Here's one way to do it:

1. For Field 1, press Ctrl+F9 and, between the field braces, type
MacroButton NoMacro [Type amount here].

2. Format Field 1 with a *character* style that you have created
for
the
purpose (if you don't know how to do that, see
http://sbarnhill.mvps.org/WordFAQs/StyleRef.htm). Let's call it
Amount
for
the sake of this example.

3. For Field 2, press Ctrl+F9 and type StyleRef "Amount"
\*DollarText
\*
FirstCap. Type "Dollars" after the field.

4. After typing the amount into Field 1, you'll have to manually
update
Field 2 (with F9) unless it's in the header or footer.

You could probably accomplish the same thing by bookmarking the
amount
you
enter and using a REF field (with the same formatting switches) to
pick
it
up.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

message
I have a document that I want to put in two FIELDS, the first
field
is
for
a
number that I will manually put in, the second field is a formula
that
refers
to a VBA code to write out the figure I put in in field 1. See
example
below.
I have done this in EXCEL and it works great. I think I figured
out
field,
but I do not know how to make the field or how to refer to it
from
field
2.
Your help would be appreciated.

Field 1 $141.47

Field 2 One Hundred Forty One and......47/100 Dollars

George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top