Table gridlines won't copy as formatted

  • Thread starter Stephen English
  • Start date
S

Stephen English

I have a document with a lot of tables in them and the user has formatted
them so that only the bottom border shows in most tables.

When I copy these tables to a new document (in code by selecting
document.range and copying and pasting), in some cases (but not all), all the
borders are showing rather than just the ones selected.

Is there a solution to this please?
Regards
Stephen English
 
S

Shauna Kelly

Hi Stephen

What Table style has been used for the table?

The default table style is Table Grid, which has borders. If you create a
table using that default style, it will have borders. If you then remove the
borders, and copy the table, it pastes with its default borders, rather than
the no
borders setting you gave it.

Try changing the style of the Table to be Table Normal and add or subtract
borders as required.

And for some discussion on the issue (where copying and pasting and using
AutoTexts results in the problem), see
http://groups.google.com/group/micr...4572ea93f76d8/70b553d09d56536#70b553d09d56536

But... having done that, if you're adding or removing borders in code, try
running the code to format the borders twice. I sometimes find that if a
table is based on Table Normal style, you need to run code twice to get the
borders to stick. I have no idea why.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
S

Stephen English

Hi Shauna
Thank you so much for that - yes that solved the problem - just have to fix
up all the tables now!
Cheers
Stephen
 

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