Solved

Gridlines on WORD template

Posted on 2011-03-01
6
629 Views
Last Modified: 2012-05-11
I have created various label templates in WORD for our users.  These are individual WORD templates on our network share.  Most Label templates are created in a Table, some of the labels we use had to be made from scratch - and the Tables are quite complicated.

My question is this....is there a way to do this and make it so all users can see the gridlines when they open the document - regardless of their own settings in WORD?  In otherwords, turn "view gridlines" (for tables) on as a default setting on the template itself - OR is there a setting that I'm missing in WORD that will allow the users to see the gridlines on any document that has a table?

Hope that made sense.
0
Comment
Question by:kolson14
  • 4
  • 2
6 Comments
 
LVL 15

Expert Comment

by:cquinn
Comment Utility
You can add an AutoOpen macro to the template with the following line of code


WordBasic.ShowTableGridlines

Open in new window

0
 
LVL 1

Author Comment

by:kolson14
Comment Utility
cquinn - got it, tried it in a new document by going into visual basic, pasting in the code you sent (it's just the one line right?) and saved it to the network share.   Went to another computer opened the document and got a macro warning.  Enabled all macros in Word and Enabled VBA, exited out and reopened, and it didn't work.....what am I missing?
0
 
LVL 15

Expert Comment

by:cquinn
Comment Utility
Not just the one line - you need an AutoOpen macro in the template that the document is based on - whole code posted below.

I have tried it on one of my templates and it works fine


Public Sub AutoOpen()
 
WordBasic.ShowTableGridlines

End Sub

Open in new window

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 15

Accepted Solution

by:
cquinn earned 125 total points
Comment Utility
PS  You may also need to have the same in an AutoNew macro if you want the gridlines to appear when the document is created, not just when an existing document is opened.
0
 
LVL 1

Author Comment

by:kolson14
Comment Utility
Sorry - VBA illiterate
So the AutoNew is the same code, just replace the AutoOpen with AutoNew?
0
 
LVL 15

Expert Comment

by:cquinn
Comment Utility
Yes - AutoNew runs when a documnt is first created, AutoOpen when a document is opened
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now