A
Alok
Hi,
Please tell me how can we update the fields with a new value.
Is there any other command than SET to update the same fieldcode.
When i have to update the same field with a new value i have to run the SET
command which ultimately creates a same field code with new value but DOESN'T
OVERWRITE TO THE EXISTING FIELDCODE.
Example:
I have set the field code with the value
Public Sub SetBookmark(objDoc As Document, sBookmark As String, sValue As
String)
If objDoc.Bookmarks.Exists(sBookmark) Then
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _
"SET " & sBookmark & " " & sValue & ""
Else
MsgBox sBookmark & "Does not Exist"
End If
End Sub
Please tell me how can we update the fields with a new value.
Is there any other command than SET to update the same fieldcode.
When i have to update the same field with a new value i have to run the SET
command which ultimately creates a same field code with new value but DOESN'T
OVERWRITE TO THE EXISTING FIELDCODE.
Example:
I have set the field code with the value
Public Sub SetBookmark(objDoc As Document, sBookmark As String, sValue As
String)
If objDoc.Bookmarks.Exists(sBookmark) Then
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _
"SET " & sBookmark & " " & sValue & ""
Else
MsgBox sBookmark & "Does not Exist"
End If
End Sub