View Single Post
 
Old 08-05-2022, 02:01 PM
Harvi007 Harvi007 is offline Windows 11 Office 2019
Novice
 
Join Date: Aug 2022
Posts: 11
Harvi007 is on a distinguished road
Exclamation Stop Press

Stop press...

so I've just checked my text and although it should work as expected, there is a slight issue...

It seems to colour the last word on a line and the first word on the line immediately after in the same colour when it should be true Odd Even colouring.

Any help on this would be much appreciated..

So close yet so far

Edit::

I put a msgbox in the code to see what the array was outputting and saw that the array is adding the newline return in the middle of the 2 words making them show as one. A sample of this is 'close.□Then'

The □ is the new line or carriage return.

For now I can get around this by changing the page size to that the next word goes to the next line without adding a carriage return, but this messes up the formatting.

Please help

Edit Again::

So I've narrowed it down to the way the array is being split with the code avar = Split(Replace(ActiveDocument.Range.Text, vbCr, " "))

I've tried to replace the vbCr with both vbCrLf and vbLf with no avail.

The carriage return used in the text is shift+enter if that helps.

Last edited by Harvi007; 08-05-2022 at 10:38 PM.
Reply With Quote