Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2006

Tip: Looking for answers? Try searching our database.

table gridlines

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 12 Dec 2006 22:33 GMT
How would I code the hiding of table gridlines for the full document using
word automation in vb.net?

Thanks

Steve
Shauna Kelly - 13 Dec 2006 08:33 GMT
Hi Steve

Gridlines (which never print, and are visual clues only) or Borders (the
lines on the edge of cells that print)?

If Borders then the following is an example of VBA code:

Dim oTable as Word.Table
   For each oTable in ActiveDocument.Tables
       With oTable.Borders(wdBorderLeft)
           .LineStyle = wdLineStyleDot
           .LineWidth = wdLineWidth225pt
           .Color = wdColorBrightGreen
       End With
   Next oTable

I find that recording a macro is the easiest way to find out the settings
you need for your particular border requirements.

If Gridlines, then I would recommend leaving the user's setting alone. It's
not a per-table or per-document setting: it affects all the user's tables in
all documents. So my advice is to let the user decide what they see on the
screen unless you want very unhappy, very confused users who hang about in
the corridor outside the boss's office saying things like "ever since that
thing that Steve did got installed on my machine, I can't use tables in my
documents".

Hope this helps.

Shauna

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

> How would I code the hiding of table gridlines for the full document using
> word automation in vb.net?
>
> Thanks
>
> Steve
Steve - 13 Dec 2006 22:28 GMT
Borders.  Thanks

Steve

> Hi Steve
>
[quoted text clipped - 36 lines]
> >
> > Steve
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.