I have a word document with a number of fields scattered around the text. The fields were created using insert > quick parts > field. Each field has a unique name.
I managed to open the document but I don't know how to reference a particular field so that I can put in my value.
I managed to iterate through the fields in the document using:
Dim flds As Word.Fields
Dim fld As Word.Field
flds = wrdDoc.Fields
For Each fld In flds
...
next
But the "fld" variable does not seem to have a "name" property and therefore I don't know how to reference a specific field.
I was hoping that there was something like:
flds("MyField1") = "blablabla"
But I can only put indexes (integers) in the brackets.
Any ideas about how I can go about reaching my goal?
Thanks