Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

macro to find what value is selected for a field

hI,

I want to write a macro to find what value is selected for a field

1 Reply
Miguel_Angel_Baeyens

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