Solved

Gridlines on WORD template

Posted on 2011-03-01
6
630 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
ID: 35010463
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
ID: 35010828
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
ID: 35011259
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 15

Accepted Solution

by:
cquinn earned 125 total points
ID: 35011274
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
ID: 35011523
Sorry - VBA illiterate
So the AutoNew is the same code, just replace the AutoOpen with AutoNew?
0
 
LVL 15

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

895 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

16 Experts available now in Live!

Get 1:1 Help Now