This tiny script replaces a piece of text that is highlighted in a document (for example, marked with a cursor) with dashes at the beginning of the line. He replaces them with an improvised marker point: (o)
the script searches for the paragraph parameter followed by a hyphen entries.
I had a similar problem as in the question above, since I was sure that the paragraph labels should be "Chr (13) and Chr (10)", which is equal to "VbCrLF", which is equal to "Carriage return, line feed" " However, βChr (13) and Chr (10)β were wrong. Naked Chr (13) did the job.
Sub MakeAppFormListPoints() 'Replace list hyphens by (o) Dim myRange As Range Set myRange = Selection.Range 'What has been marked with the cursor Debug.Print myRange ' Just for monitoring what it does myRange = replace(myRange, Chr(13) & "-", Chr(13) & "(o)") Debug.Print myRange ' Just for monitoring what it does End Sub
(I use this to adjust the text written in Word to the insanely limited character set of the official application form for the Erasmus + European Union program to promote continuous learning. Well, I learned something.)
source share