Member Avatar for Zaina jee

I want to make macro in Word to find "the" in document and replace it with "THE". Only words which have space before and after "the" should be changed and the in these or words like that should not change. How can I write commands for it in Word. I want to run it in command prompt. Which command is required to execute it?

Recommended Answers

All 4 Replies

Have you considered just using the "Find and Replace" tool? You would just tell word you want to find " the " and replace it with " THE ". Tell the tool to match the case in the advanced options.

Member Avatar for Zaina jee

Actually it is my Assignment to make macro for this purpose. Otherwise there is option available in Word to Find and Replace any word in document.

Member Avatar for Zaina jee

Thanks JorgeM. My work was done. This website is quite helpful.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.