How do I format a social security filed?

H

Hernan

I have a field that I liked to have to output a social security number with
its dashes, and also 2 other fields in which the first holds today's date and
the other should be a week later from today's date. How can I accomplish that?

Thanks in advance.

Hernan
 
D

Doug Robbins

Running a macro containing the following code will insert a date 30 days in
the future at the location of the cursor.

Selection.InsertBefore DateAdd("d", 7, Date)

You can use the formatting function to get the format that you want. e.g.

Selection.InsertBefore Format(DateAdd("d", 7, Date), "dddd, MMMM d, yyyy")

will insert

Saturday, June 4, 2005


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
Top