Prev: Autonew creates a new document from template and a new blank d
Next: Apply alternate grey/red shading to selected rows in a table
From: spunkymuffmonkey on 19 Feb 2010 05:03 Hi all, I'm programatically adding some formfields, one of which I want to have some default text displayed , altho I'm having no problem creating the formfields and setting it's default text, i cannot figure out how to update the formfield to show this default text without resetting the contents of all formfields. A snippet from the code is: Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormTextInput oTableTarget.Rows.Last.Cells(j).Select With Selection.FormFields(1) .EntryMacro = "DeleteRow" With .TextInput .EditType Type:=wdRegularText, Default:="Click to Delete Row", Format:="" End With End With I have also tried using the: .Result = "Click to Delete Row" but this doesn't seem to work either, where am I going wrong? Thanks y'all
From: spunkymuffmonkey on 19 Feb 2010 05:29
figured it out by moving the ..Result = "Click to Delete Row" down a line or two. "spunkymuffmonkey" wrote: > Hi all, > > I'm programatically adding some formfields, one of which I want to have some > default text displayed , altho I'm having no problem creating the formfields > and setting it's default text, i cannot figure out how to update the > formfield to show this default text without resetting the contents of all > formfields. > > A snippet from the code is: > > Selection.FormFields.Add Range:=Selection.Range, Type:=wdFieldFormTextInput > oTableTarget.Rows.Last.Cells(j).Select > With Selection.FormFields(1) > .EntryMacro = "DeleteRow" > With .TextInput > .EditType Type:=wdRegularText, Default:="Click to > Delete Row", Format:="" > End With > End With > > > I have also tried using the: > > .Result = "Click to Delete Row" > > but this doesn't seem to work either, where am I going wrong? > > Thanks y'all |