View Single Post
 
Old 03-04-2019, 06:56 AM
Alsadius Alsadius is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: Nov 2017
Posts: 25
Alsadius is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
I hardly think so. It could all be done with a single line of code:
Code:
Selection.Find.Execute "<Replace Me>", , , False, , , True, wdFindStop, , "New Text", wdReplaceOne
I hardly think so. The deletion and replacement are in separate subs, each of which spends a lot of lines of code figuring out what to delete/add, and it's done that way to stay consistent with significantly larger blocks of code elsewhere in the macro. I'd have to re-arrange a goodly part of my program to do it the way you suggest. When I'm demoing this to senior management this week and want it to run perfectly, and when the program as a whole has shown a fondness for subtle bugs.

I posted a stripped-down sample sub in this thread, but don't confuse that with the actual program I'm working on.
Reply With Quote