Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 655
  • Last Modified:

Gridlines on WORD template

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
kolson14
Asked:
kolson14
  • 4
  • 2
1 Solution
 
cquinnCommented:
You can add an AutoOpen macro to the template with the following line of code


WordBasic.ShowTableGridlines

Open in new window

0
 
kolson14Author Commented:
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
 
cquinnCommented:
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
[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

 
cquinnCommented:
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
 
kolson14Author Commented:
Sorry - VBA illiterate
So the AutoNew is the same code, just replace the AutoOpen with AutoNew?
0
 
cquinnCommented:
Yes - AutoNew runs when a documnt is first created, AutoOpen when a document is opened
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now