D
DataDay
Hello,
Using VBA with Word 2002, I'm using the code below to add a calculating
formfield to a table. Strangely it only works some of the time depending on
the range value. When the range is "Cell(3, 1).Range" is works fine, but
when the range is "Cell(3, 4).Range" the code stops running without an error.
Has anyone every seen this before or have a work around. This is part of a
larger sub. "doc" is the active document.
With doc.FormFields.Add(Range:=.Cell(3, 4).Range,
Type:=wdFieldFormTextInput)
.TextInput.EditType Type:=wdCalculationText, _
Default:="=sum(above)", _
Format:="0.00", _
Enabled:=False
.Range.Fields.Update
End With
Thanks
Using VBA with Word 2002, I'm using the code below to add a calculating
formfield to a table. Strangely it only works some of the time depending on
the range value. When the range is "Cell(3, 1).Range" is works fine, but
when the range is "Cell(3, 4).Range" the code stops running without an error.
Has anyone every seen this before or have a work around. This is part of a
larger sub. "doc" is the active document.
With doc.FormFields.Add(Range:=.Cell(3, 4).Range,
Type:=wdFieldFormTextInput)
.TextInput.EditType Type:=wdCalculationText, _
Default:="=sum(above)", _
Format:="0.00", _
Enabled:=False
.Range.Fields.Update
End With
Thanks