>Hello Alexander Grigorjev,
>
>Nowly i did what you saw but i'm yet have problem now the VFP shows me a message saying "Missing operand"
>
>Do you know are can be?
>
>Thank you very much
...snip
>
>Anderson Girardi
>
Hello Anderson Girardi,
try the following code:
PUBLIC oWordDocument RegistroEdital
#define wdFieldDocVariable = 64 && as defined in MS Word VB
...
oWordDocument=createobject("word.application") && Create word object
with oWordDocument
.Documents.Open("c:\athenas\ath_lici\teste.doc")
.ActiveDocument.variables("Cidade").value = "Porto Alegre"
oRange=.ActiveDocument.Range(0,0)
.ActiveDocument.Fields.Add(oRange, wdFieldDocVariable, "Teste1")
.ActiveDocument.variables("Teste1").value = "Anderson Reis Girardi"
*-- no need for FOR loop
*-- For ix= 1 to .ActiveDocument.Fields.count
*-- .ActiveDocument.Fields(ix).Update
*-- Next
*-- no need for FOR loop
.ActiveDocument.Fields.Update
.visible = .t. && Show word app - Word 7.0 support
endwith
...
Good Luck
Alexander
Alex