Thread: [Solved] VBA Swap text around
View Single Post
 
Old 11-27-2024, 12:51 AM
Shelley Lou Shelley Lou is offline Windows 10 Office 2016
Expert
 
Join Date: Dec 2020
Posts: 259
Shelley Lou is on a distinguished road
Default VBA Swap text around

Many of the older type leases I convert to house style have the text written as schedule & number first then the part & number, they may be capitalised or lowercase and either separated with a comma or a space, depending on the document being converted. The text to be swapped around may also contain cross references or are written as plain text.

Our house style requires that the part & number comes first then the word 'of' and then the schedule & number e.g.:

Instances of Schedule 1, Part 1 should be part 1 of schedule 1; or

Instances of schedule 1 part 1 should be part 1 of schedule 1.

I've been researching on how to swap text but can't seem to find anything at all really. How would I go about swapping the text, include the word 'of' and the code to recognise if it’s a cross reference field or plain text. I'm a bit stumped.

Before
Before.JPG

After
After.JPG

Swap text Part and Schedule around.docx
Reply With Quote