Google Answers Logo
View Question
 
Q: MS Word: How to eliminate 'double' grid-lines in tables - Part 2 ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: MS Word: How to eliminate 'double' grid-lines in tables - Part 2
Category: Computers > Software
Asked by: rambler-ga
List Price: $8.00
Posted: 01 May 2006 09:20 PDT
Expires: 31 May 2006 09:20 PDT
Question ID: 724397
A follow-up question to ID=724133:
  Q: how to eliminate double grid-lines in a table
  A: set CELLSPACING to zero.

The given solution works manually but not within a macro.

Manually, one is given a choice between decreasing the numeric value of spacing,
or eliminating cell spacing altogether.

When I record this in a macro, though, it appears that the macro can only
decrease the numeric value of spacing; it cannot eliminate it altogether.

I need a solution that will work in a macro.
Answer  
Subject: Re: MS Word: How to eliminate 'double' grid-lines in tables - Part 2
Answered By: hammer-ga on 01 May 2006 10:06 PDT
Rated:5 out of 5 stars
 
Rambler,

This property isn't exposed to VBA (and therefore to macros), but you can fake it.

Once you have recorded your macro, you can manually add the following
line to the code it creates:

Selection.Tables(1).Spacing = -1

That should make your table look right.

I found this technique at the Word MVP FAQ Site.
Turning "Allow spacing between cells" off with VBA in a Word 2000 table
http://word.mvps.org/FAQS/MacrosVBA/TableSpacingOff.htm

I hope this works for you. I'm not sure how well you know Word, so if
you need instructions on how to find and edit your macro code, please
let me know.

- Hammer


Search Strategy
---------------
word macro table "spacing between cells"
rambler-ga rated this answer:5 out of 5 stars and gave an additional tip of: $2.00
Just what I needed. Thank you.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy