Re: How to Format Numeric Values in Bookmarks in Word Doc.



The idea sounds great but I am new to VBA and not much familier with
WORD, If you could
explain in detail about decimal tab that would really help.

To experiment, try the following:
a. open a new document.
b. open the Format|Tabs menu and set a decimal tab at (say) 3cm. It should
be obvious how to do that
c. select and copy the paragraph a few times
d. insert some fields, e.g.

{ SET A 123.45 }{ SET B 234.56 }
then in separate rows

{ REF A \#"$,<the tab character>0.00" }
{ REF B \#"$,<the tab character>0.00" }

(use ctrl-F9 to enter the special field braces {} and type the rest of the
text in between, and use Alt-F9 to toggle between "field code" view, and
"field result view")

e. Select the document using ctrl-A and press F9 to re-execute the fields.

f. if you really feel the need to see the VBA, switch on the macro recorder
while you do that lot.

See if that gets you close to the sort of thing you want. If you use
Jezebel's suggestion - putting the values into Document Properties and using
{ DOCPROPERTY } fields to display the results, all you should need to do is
leave the DOCPROPERTY fields in the document, ensure the paragraphs they are
in have the correct tabs, and populate the appropriate document properties
with the numbers you want to display. Alternatively, you could try using
Document variables (the code looks very similar) and { DOCVARIABLE } fields
but don't do that i you're putting the values in headers/footers in older
versions of Word.

Peter Jamieson

<hareshusa@xxxxxxxxx> wrote in message
news:1143992548.508409.159770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Peter,

When you say "If you use a decimal tab between the $ and the # , e.g.
using \#"$,<tab>0.00"

Where <tab> is actually just a tab character, and set the appropriate
decimal tabs in the paragraphs the numbers appear in (or if possible,
in the
paragraph style), then you should get the layout you want.
--------------------------------------------------------------------------------------------------------------------------------------------
The idea sounds great but I am new to VBA and not much familier with
WORD, If you could
explain in detail about decimal tab that would really help.

Appreciate your help, please let me know.
Thanks so much
HJ



.


Loading