Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 02-19-2024, 03:52 PM
Guessed's Avatar
Guessed Guessed is offline Last line of paragraph centered Windows 10 Last line of paragraph centered Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
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

The macro you paid for seems overly complicated to arrive at that solution. You can get that kind of alignment two simpler ways without using a macro to add a special-sized space.

Method 1. Add a tab at the END of the paragraph and apply this paragraph alignment
Selection.ParagraphFormat.Alignment = wdAlignParagraphDistribute

This method is the one I recommend because the text can be edited freely without breaking the layout at any time. You can also apply it quickly to existing text with a style and a simple find/replace macro to make sure there is a tab at the end of every paragraph.

Method 2. There are special alignment tabs which can be inserted into a header/footer (only available via the Header/Footer tab on the ribbon) and then copy/pasted into the body of the document. One of these 'special' tabs allows you to centre the text. It could be used instead of the space shim that the addin placed in your sample doc. The benefit of this is that you don't need to calculate the size of that shim for every paragraph.

This second method is barely better than than the addin method since you still need to work out where the soft return goes and would need to fiddle a lot when the paragraph is subsequently edited to fix it up when line lengths change.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centered line before and after a word Miguel Word 6 02-05-2023 09:02 AM
Last line of paragraph centered Hard Paragraph after Every Line jcolleenb Word 2 06-08-2020 03:50 PM
syntax for inserting blank line before inserting table and after a line or paragraph SamDsouza Word VBA 8 08-04-2019 11:10 PM
Last line of paragraph centered line separator for paragraph creieru Word 1 06-07-2012 11:11 AM
Last line of paragraph centered How can I make this line look like a paragraph? steeleye Excel 1 07-15-2009 02:13 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:21 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