Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2023, 09:10 PM
JacobHutson JacobHutson is offline Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 10 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Novice
Put a vertical line to the left of the numbering in a Paragraph style for a heading
 
Join Date: Sep 2023
Posts: 3
JacobHutson is on a distinguished road
Default Put a vertical line to the left of the numbering in a Paragraph style for a heading

I am hoping for some word gurus out there to have a method to insert a line before a heading as a paragraph style. I am running out of ideas on how to do this in word.

I want to add a vertical line eg 18pt to the left of the section heading and be 60 pt high.
I need the section heading to be real Heading numbers for TOC

Ideally this would be paragraph style so you can just select that style and keep going on the document. Rather than hand building it for each section.
This is easy to do in InDesign with paragraph rules, but not so word.

What I am trying to achieve is attached..........
Thanks in advance....

Attached Images
File Type: png Screenshot 2023-09-20 140652.png (3.6 KB, 21 views)
Reply With Quote
  #2  
Old 09-19-2023, 10:01 PM
Charles Kenyon Charles Kenyon is offline Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 11 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You could create an AutoText or AutoCorrect entry and use that to repeat the formatting.
You could set a paragraph style with a left border. Set a distance for a border.
Reply With Quote
  #3  
Old 09-19-2023, 10:07 PM
Charles Kenyon Charles Kenyon is offline Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 11 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Cross-posted at Put a vertical line to the left of the numbering in a Paragraph style for a heading - Microsoft Community Hub


For cross-posting etiquette, please read: A Message to Forum Cross-Posters A message to forum cross posters - Excelguru
Reply With Quote
  #4  
Old 09-20-2023, 06:32 AM
jthomas666 jthomas666 is offline Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 10 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2016
Competent Performer
 
Join Date: Jun 2016
Location: Warner Robins, GA
Posts: 175
jthomas666 will become famous soon enough
Default

Quote:
Originally Posted by Charles Kenyon View Post
You could create an AutoText or AutoCorrect entry and use that to repeat the formatting.
You could set a paragraph style with a left border. Set a distance for a border.
I'd go with the paragraph style. I've used that method before and it works well.
Reply With Quote
  #5  
Old 09-20-2023, 04:25 PM
JacobHutson JacobHutson is offline Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 10 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Novice
Put a vertical line to the left of the numbering in a Paragraph style for a heading
 
Join Date: Sep 2023
Posts: 3
JacobHutson is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
You could create an AutoText or AutoCorrect entry and use that to repeat the formatting.
You could set a paragraph style with a left border. Set a distance for a border.
Hi Charles..
already been there with the paragraph border , and this is pretty close unfortunately the border size seems to max out at 6pt and i need 18pt to match my branding restrictions.

The arbitrary limits in word can get quite frustrating.
Reply With Quote
  #6  
Old 09-21-2023, 01:25 AM
Italophile Italophile is online now Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 11 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Expert
 
Join Date: Mar 2022
Posts: 338
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by JacobHutson View Post
Hi Charles..
already been there with the paragraph border , and this is pretty close unfortunately the border size seems to max out at 6pt and i need 18pt to match my branding restrictions.

The arbitrary limits in word can get quite frustrating.
The limits only apply to the dialog and can be overcome by editing the xml for the style definition.

NOTE: If you later make edits to the style you must stay out of the borders and shading
dialog or you will overwrite your edit.

First, apply a 6pt border in the correct colour and at the correct distance. Save the template/document.
The simplest method from this point is to use 7-zip or NanaZip to open the document archive so that you can edit the files.
Open the styles.xml from the word folder for editing. I use Visual Code but a text editor will also work.
You'll need to find the second instance of "heading 1" to get the style definition. See screenshot.
The part of the definition you need is:
Code:
<w:pBdr>
    <w:left w:val="single" w:sz="48" w:space="18" w:color="00759E" w:themeColor="accent1"/>
</w:pBdr>
and you need to edit the parameter "w:sz". You will note that the value of this is the border size in points multiplied by 8. So change the value of 48 to 144, save the file and close the editor. If you are using 7-zip or NanaZip you will be asked if you want to update the archive with the changes.
As you will see in the final screenshot you now have an 18pt border 18pts from the paragraph.
Attached Images
File Type: png Screenshot 2023-09-21 091429.png (16.2 KB, 17 views)
File Type: png Screenshot 2023-09-21 091653.png (46.6 KB, 15 views)
File Type: png Screenshot 2023-09-21 091926.png (15.9 KB, 16 views)
Reply With Quote
  #7  
Old 09-21-2023, 03:54 PM
Guessed's Avatar
Guessed Guessed is offline Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 10 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Quote:
The limits only apply to the dialog and can be overcome by editing the xml for the style definition.
Bravo Italophile
This is a game changer!
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #8  
Old 09-22-2023, 12:53 AM
JacobHutson JacobHutson is offline Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 10 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Novice
Put a vertical line to the left of the numbering in a Paragraph style for a heading
 
Join Date: Sep 2023
Posts: 3
JacobHutson is on a distinguished road
Smile

Thank you 1 Million times.
I never thought it was possible and has opened my eyes to the world inside of word documents..

Thank you Italophile for your Genius answer.
Reply With Quote
  #9  
Old 09-22-2023, 04:43 AM
Italophile Italophile is online now Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 11 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Expert
 
Join Date: Mar 2022
Posts: 338
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by Guessed View Post
Bravo Italophile
This is a game changer!
It's a technique that I have used for some years which I also use to apply inside borders to first and last columns for Table Styles.
Attached Images
File Type: png Screenshot 2023-09-22 124211.png (35.4 KB, 9 views)
Reply With Quote
  #10  
Old 09-22-2023, 11:52 AM
Charles Kenyon Charles Kenyon is offline Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 11 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I've added a link to post#6 in my page on Understanding Styles, if for no other reason than that I may be able to find it again. If I knew your real name, Italophile, I would credit you there, as well. You've made a valuable contribution to the Word community here. I expect it will also lead to other discoveries on things that can be done in XML.
Reply With Quote
  #11  
Old 09-23-2023, 03:12 AM
Italophile Italophile is online now Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 11 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Expert
 
Join Date: Mar 2022
Posts: 338
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

There are a number of things that can be done in XML that can't be done in the UI. Most are well documented on the internet. One resource is John Korchok's series on XML Hacking at his Brandwares.com site. Whilst the focus of this is PowerPoint there are some Word specific articles, as well as articles on extending Office Theme colours that apply across the suite, and some PowerPoint specific techniques that can be applied to Word, e.g. shape locking.
I haven't included a direct link to the page as I have previously found that deep linking to his site can be unreliable.
Attached Images
File Type: png Screenshot 2023-09-23 110304.png (47.1 KB, 9 views)
Reply With Quote
  #12  
Old 09-23-2023, 10:37 AM
Charles Kenyon Charles Kenyon is offline Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 11 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Thank you. I am well aware of John's contributions.

John Korchock - Best Practices - much about PowerPoint, some about Word - Start here and look at Older Posts
I have a number of bookmarks and like you have found that sometimes things move around. The link above is simply to the last post on the site and the way I titled it in my bookmarks.

Here is one on styles: Managing Styles with XML editing by John Korchok
It does not have the border trick you demonstrated.

I also have his book OOXML Hacking.
Reply With Quote
  #13  
Old 09-23-2023, 01:02 PM
Italophile Italophile is online now Put a vertical line to the left of the numbering in a Paragraph style for a heading Windows 11 Put a vertical line to the left of the numbering in a Paragraph style for a heading Office 2021
Expert
 
Join Date: Mar 2022
Posts: 338
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by Charles Kenyon View Post
It does not have the border trick you demonstrated.
It doesn't need to. Once you understand that you can edit the xml to get around limitations you learn by experimentation. That's how John learned.

But you only experiment when you have a need to do something. Necessity is, after all, the mother of invention. I only learned to modify the border in this way because a client had the same intractable design issue. Similarly, I only experimented with the missing options in table styles because I needed to create a single table style that could be used to produce multiple table designs for different purposes by simply toggling the style options.
Reply With Quote
Reply

Tags
formatting, leader, vertical bar



Similar Threads
Thread Thread Starter Forum Replies Last Post
line numbering on left and right of page? tommydog Word 1 01-13-2021 08:20 AM
Put a vertical line to the left of the numbering in a Paragraph style for a heading applying heading style within paragraph using macro cheech1981 Word 8 08-23-2017 03:07 PM
How remove short vertical line in left margin of text?from NightWriter Word 4 02-29-2016 05:20 PM
Put a vertical line to the left of the numbering in a Paragraph style for a heading Using heading style level in a paragraph kam Word 7 03-24-2014 02:58 PM
Put a vertical line to the left of the numbering in a Paragraph style for a heading How to get rid of the vertical line at the left side? pstein Word 1 03-27-2012 03:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft