D
dave.cuthill
I have kind of slapped the following together to loop through the
formfields in a table to find which field has the value "Production"
but from there I need to know the value of the cell offset by one
column to the right but cannot figure how I can determine position of
this formfield within the table. Also rather than have the loop go
through the complete table is it possible to limit the search to only
the first column of the table but it did not seem to function
For Each oFormfield In
ActiveDocument.Tables(1).columns(1).Range.FormFields
Dim vName As Variant
Dim sResult As String
Dim oFormfield As FormField
For Each oFormfield In ActiveDocument.Tables(1).Range.FormFields
If oFormfield.Type = wdFieldFormDropDown Then
vName = oFormfield.Name
sResult = oFormfield.Result
if sResult="Production" then
'Figure out cell location within the table and value of cell
offset by one column to the right
End If
End if
Next
Set oFormfield = Nothing
End Sub
formfields in a table to find which field has the value "Production"
but from there I need to know the value of the cell offset by one
column to the right but cannot figure how I can determine position of
this formfield within the table. Also rather than have the loop go
through the complete table is it possible to limit the search to only
the first column of the table but it did not seem to function
For Each oFormfield In
ActiveDocument.Tables(1).columns(1).Range.FormFields
Dim vName As Variant
Dim sResult As String
Dim oFormfield As FormField
For Each oFormfield In ActiveDocument.Tables(1).Range.FormFields
If oFormfield.Type = wdFieldFormDropDown Then
vName = oFormfield.Name
sResult = oFormfield.Result
if sResult="Production" then
'Figure out cell location within the table and value of cell
offset by one column to the right
End If
End if
Next
Set oFormfield = Nothing
End Sub