|
|
|
date: Wed, 2 Jul 2008 05:56:04 -0700,
group: microsoft.public.word.tables
back
Re: Word Table-Automatically show a $ in the money column?
Word doesn't allow you to specify numeric formats for table cell contents.
What you can do is make use of text form fields, whose formats can be
specified, and then enable forms protection. For more on using forms in
Word, see http://word.mvps.org/faqs/customization/FillinTheBlanks.htm.
The easiest approach, however, might be to embed an Excel spreadsheet in
your Word document, using the spreadsheet instead of a Word table.
--
Stefan Blom
Microsoft Word MVP
"Charitychic" wrote in message
news:ED646E12-D3BE-4F03-A3D7-B3A2C5683A70@microsoft.com...
> In Word, I have made a table with names of donors, their address, and the
> amounts they donated. One column is money amounts...I would like to just
> type
> in say, 25 and have it come out as $25. How do I get the $ in there
> automatically?
date: Wed, 2 Jul 2008 15:20:07 +0200
author: Stefan Blom
Re: Word Table-Automatically show a $ in the money column?
While Excel is possibly the simplest solution, it is posible to convert
numbers to fields using a macro. The following macro will format as currency
the number in the table cell that contains the cursor. Attached to a
keyboard shortcut it is as near 'automatic' as you will get. The resulting
fields can be calculated, unlike plain text entries with currency symbols.
Sub FormatNumberInCellAsField()
Dim sNum As String
With Selection
.SelectCell
.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
sNum = .Text
If sNum = "" Then Exit Sub
sNum = sNum & " \# ,$0.00"
With .Fields
.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
Text:="= " & sNum, _
PreserveFormatting:=False
.Update
End With
End With
ActiveWindow.View.ShowFieldCodes = False
End Sub
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Charitychic wrote:
> In Word, I have made a table with names of donors, their address, and
> the amounts they donated. One column is money amounts...I would like
> to just type in say, 25 and have it come out as $25. How do I get the
> $ in there automatically?
date: Wed, 2 Jul 2008 17:06:44 +0300
author: Graham Mayor
|
|