View Single Post
 
Old 06-13-2024, 05:33 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 Bold text before first colon only

Hi Andrew and Greg, thank you so much for your replies. I've test both codes and have attached two documents with the results.

Andrews Code.docx
Gregs Code.docx

Andrew, the text to run the code will always be unformatted text copied from a converted pdf so the lists will always be manual numbered lists - I have another macro to do all the other formatting tasks e.g. auto numbering. In your code it needs to have a function to remove the quote marks and not bold the numbered lists.

Greg, your code came very close to being perfect. As with all converted documents the formatting can be hit and miss in terms of tabs and spaces so the only thing it didn't update was if the quoted text had a space instead of a tab and if the bold colons could be removed and replaced with a tab.

I really appreciate the help you have both given me on this.
Reply With Quote