Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-26-2020, 01:18 PM
bncoxuk bncoxuk is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2013
Novice
Why comma and percentage sign sticks out on the right
 
Join Date: Nov 2020
Posts: 6
bncoxuk is on a distinguished road
Default Why comma and percentage sign sticks out on the right

Hi everyone,



I have a silly question but really strange. Basically, the comma, and percentage sign % stick out on the right, without aligning properly. I cannot find a way to solve it.

So I have to find some help here. Many thanks
Attached Files
File Type: docx Formatting Q.docx (15.2 KB, 15 views)
Reply With Quote
  #2  
Old 11-26-2020, 02:57 PM
Guessed's Avatar
Guessed Guessed is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
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

That is an interesting question. My first thought is that it is due to the font metrics of the typeface you had chosen. Some fonts don't appear to have the same problem but some do.

A second possibility is the type of justification being applied. Using the GUI, you can have one type of text justification but if you play with the VBA code there are actually a whole range of justification commands that could be applied to the text. There must be a complex set of rules applied that look at the length of words in the line to determine wrapping points and this appears to impact the right border alignment. Some of these options do give you an aligned right justification of those characters but it may depend on the content of the line itself. You would need to do more testing though as we only have a single paragraph to test in that example you posted.
Code:
Sub aTest()
  ActiveDocument.Range.ParagraphFormat.Alignment = wdAlignParagraphJustify
  ActiveDocument.Range.ParagraphFormat.Alignment = wdAlignParagraphJustifyHi
  ActiveDocument.Range.ParagraphFormat.Alignment = wdAlignParagraphJustifyMed
  ActiveDocument.Range.ParagraphFormat.Alignment = wdAlignParagraphJustifyLow
  ActiveDocument.Range.ParagraphFormat.Alignment = wdAlignParagraphDistribute
  ActiveDocument.Range.ParagraphFormat.Alignment = wdAlignParagraphThaiJustify
End Sub
If you arrange your screen so you can see the document and the code, step through each of the lines of code (by pressing F8) and see the effect on the page layout. Is there one of those options that gives you an acceptable result in ALL instances?

You might want to do some google searching on these VBA alignment options. Perhaps it is documented somewhere what the different options actually do to your text.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 11-26-2020, 03:08 PM
bncoxuk bncoxuk is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2013
Novice
Why comma and percentage sign sticks out on the right
 
Join Date: Nov 2020
Posts: 6
bncoxuk is on a distinguished road
Default

Many thanks, Andrew. The font is very basic: Times New Roman.

So is there any simple option to correct that?
Reply With Quote
  #4  
Old 11-26-2020, 04:35 PM
Charles Kenyon Charles Kenyon is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
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

Try the Justify High setting.
I cannot explain it.
Reply With Quote
  #5  
Old 11-26-2020, 04:45 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2019
Moderator
 
Join Date: Aug 2011
Posts: 3,872
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Adding a new paragraph to the document (by pressing Enter) and then copying the content, except for the new paragraph, into a new, blank document works around the issue, so there is clearly something about the formatting in the original document.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #6  
Old 11-26-2020, 05:34 PM
bncoxuk bncoxuk is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2013
Novice
Why comma and percentage sign sticks out on the right
 
Join Date: Nov 2020
Posts: 6
bncoxuk is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
Try the Justify High setting.
I cannot explain it.
Hi, can you tell me how to find the 'Justify High' setting? It seems that this option is not available in Word. Only one single option 'Justify'
Reply With Quote
  #7  
Old 11-26-2020, 05:35 PM
bncoxuk bncoxuk is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2013
Novice
Why comma and percentage sign sticks out on the right
 
Join Date: Nov 2020
Posts: 6
bncoxuk is on a distinguished road
Default

Quote:
Originally Posted by Stefan Blom View Post
Adding a new paragraph to the document (by pressing Enter) and then copying the content, except for the new paragraph, into a new, blank document works around the issue, so there is clearly something about the formatting in the original document.
Hi, if you try to copy this paragraph into a new document, the problem is still there. Even if you copy it to a notepad and then copy it again to Word, the problem is there.
Reply With Quote
  #8  
Old 11-26-2020, 05:50 PM
bncoxuk bncoxuk is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2013
Novice
Why comma and percentage sign sticks out on the right
 
Join Date: Nov 2020
Posts: 6
bncoxuk is on a distinguished road
Default

I managed to find the 'Justify Low', etc. buttons to give me extra options. Thank you everyone for the great advice. It is really helpful and solved my problem!
Reply With Quote
  #9  
Old 11-26-2020, 10:41 PM
Charles Kenyon Charles Kenyon is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
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

In your original document, if I go into the custom Margins dialog and do not change anything but click on OK to exit, the anomaly disappears. (The line lengths change as well.)

Last edited by Charles Kenyon; 11-27-2020 at 07:33 AM.
Reply With Quote
  #10  
Old 11-26-2020, 11:35 PM
Guessed's Avatar
Guessed Guessed is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
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

I think there will be variable experiences with this issue. The line lengths will vary with printer drivers for instance. Then you can do things on the second last line such as delete 'the' or 'of' to get the 6.4% to fall at the end of the line. In one case it sits out and the other it aligns

I really have no idea how the justification is calculated but it appears to squeeze content that almost fits as well as stretching content that is a little short. Perhaps when it is squeezes a line these outriders happen but they don't if the line requires expansion.

The Justify Low setting 'appears' to work in this paragraph but I would want to see a large number of instances and vary margin sizes, typefaces and font sizes before I would be fully confident in saying that is the solution.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #11  
Old 11-27-2020, 01:46 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2019
Moderator
 
Join Date: Aug 2011
Posts: 3,872
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Quote:
Hi, if you try to copy this paragraph into a new document, the problem is still there. Even if you copy it to a notepad and then copy it again to Word, the problem is there.
In Word, adding a blank paragraph and omitting that paragraph before copying and pasting into a new, blank document did not work for you?

That suggests that the problem exists in the Normal template as well.

Have you ever had any settings for Asian languages enabled in Word/Office?
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #12  
Old 11-27-2020, 02:59 AM
Guessed's Avatar
Guessed Guessed is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
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

Stefan

I think this is highly dependent on page setups and style definitions and if the new blank document is slightly different then the line wraps could be completely different and you might or might not see the same issue.

I can confirm that on my machine, although I've never had Asian languages enabled, I do see different spacing and line wrapping by stepping through the justify options.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #13  
Old 11-27-2020, 03:05 AM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2019
Moderator
 
Join Date: Aug 2011
Posts: 3,872
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

Andrew,

I haven't experimented with the various justification options (yet).

So far, I have only drawn the conclusion that if copying to a new, blank document (excluding the final paragraph mark of the source document) does not help, the undesired setting must be defined in the Normal template as well.
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional
Reply With Quote
  #14  
Old 11-27-2020, 03:11 AM
bncoxuk bncoxuk is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2013
Novice
Why comma and percentage sign sticks out on the right
 
Join Date: Nov 2020
Posts: 6
bncoxuk is on a distinguished road
Default

Quote:
Originally Posted by Stefan Blom View Post
In Word, adding a blank paragraph and omitting that paragraph before copying and pasting into a new, blank document did not work for you?

That suggests that the problem exists in the Normal template as well.

Have you ever had any settings for Asian languages enabled in Word/Office?
That is right. Asian languages (Chinese) is enabled in my computer. In Word, it can also read Asian language.
Reply With Quote
  #15  
Old 11-27-2020, 07:34 AM
Charles Kenyon Charles Kenyon is offline Why comma and percentage sign sticks out on the right Windows 10 Why comma and percentage sign sticks out on the right Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
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

One additional thought is that this document originated somewhere other than in Word.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
usage of $ sign msnarayanan Excel 1 12-14-2019 02:31 AM
Why comma and percentage sign sticks out on the right Word sticks on shutdown kenrob Word 2 07-02-2018 09:59 PM
Why comma and percentage sign sticks out on the right Add a comma mbesspiata Excel 7 06-09-2014 03:36 AM
How to sign out from the outlook? Jamal NUMAN Outlook 0 11-21-2010 07:28 PM
Why comma and percentage sign sticks out on the right thousands comma separator taylormayd Excel 3 02-20-2009 03:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:54 PM.


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