Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Maintain Form Field Format
I am working in Word 2003.
I have a table; 5 columns, 2 rows. The first row consists of column headings, the second row contains form fields in each column. I have an on exit macro on the last form field that creates a new row with form fields in each column. Two of the form fields are dates with the format of MMMM d, yyyy. The new fields do not maintain this date format. Is there a way to copy the formats of the form fields? Here is my coding: Sub AddRow() Dim rownum As Integer, i As Integer ActiveDocument.Unprotect ActiveDocument.Tables(1).Rows.Add rownum = ActiveDocument.Tables(1).Rows.Count For i = 1 To ActiveDocument.Tables(1).Columns.Count ActiveDocument.FormFields.Add Range:=ActiveDocument.Tables(1).Cell(rownum, i).Range, _ Type:=wdFieldFormTextInput Next i ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, _ ActiveDocument.Tables(1).Columns.Count).Range.Form Fields(1).ExitMacro = "addrow" ActiveDocument.Tables(1).Cell(ActiveDocument.Table s(1).Rows.Count, _ 1).Range.FormFields(1).Select ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True End Sub Thanks! -- Jamie |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I maintain format of labels to a second page? | Microsoft Word Help | |||
how do i maintain the format with mail merge | Mailmerge | |||
Maintain table format after update | Microsoft Word Help | |||
Maintain table format after update | Tables | |||
Maintain table format after update | Microsoft Word Help |