View Single Post
 
Old 01-10-2025, 09:13 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,469
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

A couple of pointers:
1. Your code to clear an existing grid could be reduced to:
Code:
If oFrm.chkClear Then ActiveDocument.Range.Delete
2. Instead of repeatedly creating and formatting oLine for each iteration of the loop, create three side-by-side textboxes, each one 1/3 of the page width and insert a table into each textbox with 1/3 of the columns (a Word table can span up to 63 columns and the most you'll need is 134) and however many rows you need, spacing the rows and columns as required. Strictly speaking, you only need two tables for 1/8" and three for 1/16" - all the rest could be done with one table. Even a 1/12" (6pt) grid would only require two tables.

An alternative approach would be to create a 1/4-page size textbox and insert 1/4 of the grid into that, then replicate three copies of the textbox, positioned appropriately on the page.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote