Make an inputQuery replace a variable in word if the condition is true

0

I'm working with delphi and need a method that does the following in the open word document look for a variable '@Name' if it finds the variable '@Name' open an inputQuery for the user to enter the new value of the variable and then replace the '@Name' with the value entered in the InputQuery.

Begin
if Doc.Content.Find.Execute(FindText := '@Ref') then
  InputQuery('Nome Funcionario', 'Insira um Valor:', ref);
  Doc.Content.Find.Execute(FindText := '@Ref', ReplaceWith := ref);
end;
    
asked by anonymous 06.10.2017 / 14:34

0 answers