WORD 2007 VBA Table Gridlines

P

p4patricia

I have created a template which contains tables without borders. So that the
user can see the tables I would like to ensure that they have their table
gridlines turned on. Using VBA code I have tried both:
ActiveWindow.View.TableGridlines = True
and:
wordbasic.showtablegridlines
These work only if the user has the gridlines already turned OFF. If they
are turned on then this code turns the gridlines off.
I want to ensure that the table gridlines are always on.....
 
D

DaveLett

Hi,
To hide the gridlines, you also have to NOT show text boundaries, I believe.

ActiveWindow.View.ShowTextBoundaries = False

HTH,
Dave
 
P

Pesach Shelnitz

Hi,

The line

ActiveWindow.View.TableGridlines = True

turns table gridlines on and leaves them on for me in both Word 2007 and
Word 2003.

The following code will toggle showing and hiding gridlines (the behavior
that you described).

ActiveWindow.View.TableGridlines = _
Not ActiveWindow.View.TableGridlines
 

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