Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hI,
I want to write a macro to find what value is selected for a field
Hello,
Something like the following should work
Sub SelVal Set ValsforField = ActiveDocument.Fields("FieldName").GetSelectedValues If (ValsforField.Count = 0) Then MsgBox("Nothing selected in field FieldName") Else For i = 0 To ValsforField.Count -1 MsgBox ValsforField.Item(i).Text Next End IfEnd Sub
Hope this helps