-
1
- #1
Hi,
I am trying to update fields in Microsoft Word XP. At the moment I am going through them sequentially:
w.ActiveDocument.Fields.Item(1).Select()
w.Selection.TypeText(Text:="New value here")
I would like to be able to reference each one by the name I have given them in Microsoft Word XP
If it helps, the following VB6 code is what im trying to achieve in VB.NET:
For Each sProp In w.ActiveDocument.CustomDocumentProperties
If sField = sProp.Name Then
'To change the value of custom property
sProp.Value = sValue
End If
Next sProp
Many thanks in advance
Thomas Griffiths
tom@vscan.org
P.S. If you have any Microsoft Word automation tutorials , I would be grateful for the URL, Thanks.
I am trying to update fields in Microsoft Word XP. At the moment I am going through them sequentially:
w.ActiveDocument.Fields.Item(1).Select()
w.Selection.TypeText(Text:="New value here")
I would like to be able to reference each one by the name I have given them in Microsoft Word XP
If it helps, the following VB6 code is what im trying to achieve in VB.NET:
For Each sProp In w.ActiveDocument.CustomDocumentProperties
If sField = sProp.Name Then
'To change the value of custom property
sProp.Value = sValue
End If
Next sProp
Many thanks in advance
Thomas Griffiths
tom@vscan.org
P.S. If you have any Microsoft Word automation tutorials , I would be grateful for the URL, Thanks.