oWordDocument=createobject("word.application") && Create word object with oWordDocument with oWordDocument.wordbasic .appshow .fileopen("c:\temp\ander.doc") endwith .ActiveDocument.variables("Cidade").value = "Porto Allegre" For ix= 1 to .ActiveDocument.Fields.count if at("Cidade",.ActiveDocument.Fields(ix).Code.text) > 0 .ActiveDocument.Fields(ix).Update EndIf Next endwithCetin