Link to home
Start Free TrialLog in
Avatar of wqclatre
wqclatre

asked on

How can I do this in delphi?

On http://word.mvps.org/FAQs/TblsFldsFms/FastTables.htm

There is some tip on how to maximize the performence using word and ole.

I wounder how I can do this routin in delphi:

Dim oCell As Cell

Application.ScreenUpdating = False
Selection.Tables(1).Select
For Each oCell In Selection.Cells
    oCell.Range.Text = "Hi there"
Next oCell
Application.GoBack
Application.ScreenUpdating = True

End Sub


If I do:

WordApp.Table.Item(1).select.
for ix := 1 to WordApp.Selection.Cells.count-1 do
begin
  WordApp.Selection.Cells.Item(px).Range.Text:= 'aaaa';

end;


The selection seems to be modified.

If cells.count is 5 when I start it becomes 1 after the first time
  WordApp.Selection.Cells.Item(px).Range.Text:= 'aaaa';
has run.

ASKER CERTIFIED SOLUTION
Avatar of pcsentinel
pcsentinel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial