>Hello Alexander Grigorjev,
>
>I thank you to try help me, I did what you say and now the VFP shows a error message saying "Function name is missing )."
>
>You can help me
>
>
Hello,
The syntax of the Add function:
Add(Range, Type, Text, PreserveFormatting)
!!!!!!!!!!!!!
Range Required Range. The range where you want to add the field. If the range isn't collapsed, the field replaces the range.
!!!!!!!!!!!!!
...
You need to use the Range object.
Move the cursor into position where you want to insert new Field.
The following example returns a Range object that refers to the first position in the active document.
oRange = oWrd.ActiveDocument.Range(0,0)
Next you can insert new Field in Document.
oWrd.ActiveDocument.Fields.Add( oRange, wdFieldDocVariable, "YourVariableName")
Good Luck.
Alexander Grigorjev
Alex