P
paraakaram
Hi there,
The problem is that, I have written this macro, which would find the "SET"
type of fields inside the document
and then replace the text inside the "SET Field" with text I pass
This is the macro
/*This would open the document which contains set field*/
Application.Documents.Open ("C:/Test Field.doc")
Application.Visible = True
Call merging
/*Here call is made to another macro */
/*This would try replacing the text inside the set field*/
If ActiveDocument.Fields.Count > 0 Then
For i = 1 To ActiveDocument.Fields.Count
ActiveDocument.Fields.Add
Range:=ActiveDocument.Fields.Item(1).Code.Previous, _
Type:=wdFieldEmpty, _
Text:="SET F256_1 NewText"
ActiveDocument.Fields.Update
Next
End If
The strange part here is, this works perfectly on my system (Word 2003)
but there is a system in my lab where this instead of replacing the text
inside the set field
would insert new set field in the document
It is very strange because only this system shows such a behavior (it has
msword 2002 SP3 )
Thanks & Kind Regards
Paraakaram
The problem is that, I have written this macro, which would find the "SET"
type of fields inside the document
and then replace the text inside the "SET Field" with text I pass
This is the macro
/*This would open the document which contains set field*/
Application.Documents.Open ("C:/Test Field.doc")
Application.Visible = True
Call merging
/*Here call is made to another macro */
/*This would try replacing the text inside the set field*/
If ActiveDocument.Fields.Count > 0 Then
For i = 1 To ActiveDocument.Fields.Count
ActiveDocument.Fields.Add
Range:=ActiveDocument.Fields.Item(1).Code.Previous, _
Type:=wdFieldEmpty, _
Text:="SET F256_1 NewText"
ActiveDocument.Fields.Update
Next
End If
The strange part here is, this works perfectly on my system (Word 2003)
but there is a system in my lab where this instead of replacing the text
inside the set field
would insert new set field in the document
It is very strange because only this system shows such a behavior (it has
msword 2002 SP3 )
Thanks & Kind Regards
Paraakaram