Table formatting code extremely slow

B

Bill Sturdevant

I have some code that develops tables in excel and then pastes them into a
Word document. There may be as many as 150 tables, all identical but for the
data values.

After pasting them into Word, I execute a Word macro that loops through the
tables in the document and for each of those I have just pasted in, executes
numerous formatting commands. As each subsequent table is processed, the
code gets slower and slower.

Why is this and is there anything I can do? I have turned off screen
updating, but to no avail.
 
J

Jay Freedman

I have some code that develops tables in excel and then pastes them into a
Word document. There may be as many as 150 tables, all identical but for the
data values.

After pasting them into Word, I execute a Word macro that loops through the
tables in the document and for each of those I have just pasted in, executes
numerous formatting commands. As each subsequent table is processed, the
code gets slower and slower.

Why is this and is there anything I can do? I have turned off screen
updating, but to no avail.

Hi Bill,

See http://www.word.mvps.org/FAQs/TblsFldsFms/FastTables.htm for some
tips.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top