Board index » delphi » Accessing Label's and TextBox's in a Word Document

Accessing Label's and TextBox's in a Word Document

Hi all!

I have a Word document and it has some Label's (like the Delphi TLabel) and
TextBox's (like the Delphi TEdit). With OLE Automation I've done almost
everything I want, except change the text of a Word Label. So my problem is
that I want to change the text of Word Label.

In my tests I used some properties in pieces of code, like Shapes,
TextFrame, TextRange, Text.

Thank You all!

Jose Carlos
Quality Informatica

 

Re:Accessing Label's and TextBox's in a Word Document


<<Jose Carlos:
So my problem is that I want to change the text of Word Label.

Quote

If you can select your label, you can then use the
selection's text property:
  Document.Shapes.Item(ControlName).Select(EmptyParam);
  Word.Selection.Text := 'Success!';

Deborah Pate

Other Threads