Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 04-14-2025, 06:00 AM
gmaxey gmaxey is offline How do I insert a horizontal line at the end of a document? Windows 10 How do I insert a horizontal line at the end of a document? Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

As an alternative, you can use a buildingblock and be macro free.


Select an existing Journal entry or better yet create a new one along the lines suggested by Italophile (with or without creating styles), select it, press ALT+F3 to create the BuildingBlock.


Now you can insert a new journal entry header by simply typing "jour..." and pressing Enter when the autocomplete tip text line appears.


Advantages:
Macro free
No shapes
No empty paragraphs


Disadvantages:
If you share the document with others, you must share the template as well


If you want to use some keyboard shortcut with a macro:


Code:
Sub InsertJE()
  On Error GoTo Err_NotFound
  ActiveDocument.AttachedTemplate.BuildingBlockEntries("journalentry").Insert _
               Selection.Range, RichText:=True
  Exit Sub
lbl_Exit:
  Exit Sub
Err_NotFound:
  MsgBox "The building block ""journalentry"" was not found in " _
          & ThisDocument.Name & " attached template.", vbInformation + vbOKOnly, _
          "MISSING BUILDING BLOCK"
  Resume lbl_Exit
End Sub
Attached Images
File Type: jpg BB Text.jpg (39.1 KB, 10 views)
File Type: jpg BB Definition.jpg (52.4 KB, 9 views)
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I insert a horizontal line at the end of a document? Creating a horizontal line in a document jjjoverthere Word 2 11-03-2018 05:39 PM
How do I insert a horizontal line at the end of a document? Horizontal line I can't delete goingvirtual Word 2 09-09-2018 02:58 AM
How do I insert a horizontal line at the end of a document? MS Word Horizontal Line Disappears after pressing Enter from end of line MikeWhite Word 5 01-20-2017 03:39 PM
How to change the default features for AutoShape horizontal line (button 'Insert horizontal line') 534tomasz Word 6 10-13-2016 02:33 AM
How do I insert a horizontal line at the end of a document? Putting a horizontal line in a Word Document -- should be simple, right? biotechguy Word 4 05-10-2010 11:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:44 PM.


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