![]() ![]() ![]() Here are other sample scripts with similar goals. The letter defined in the script should now have its font color changed. Now, click on the "Run" button on the VBA Toolbar and switch back to your Word Document. ' Enter one of the Word color Constant names to determine the color to change the letter toįor i = 1 To To know more about the types of documents that you can create or to create documents by using templates then visit NEW > TEMPLATE OPTION in Microsoft Word. ' Case matters, "A" is not the same as "a" ' Enter the exact letter you want to globally search for in ThisDocument In the Window that opens up, paste in the following Visual Basic Code: Sub ChangeLetterColor() Under "Microsoft Word Object" double-click "ThisDocument" to add some code to this Word document. Visual Basic for Applications will open up. In the Word Document that you want to perform this magic in (the one you saved as a Macro-Enabled Word document) click on the newly visible Developer Tab and click on the "Visual Basic" button to open Visual Basic. You then need to be able to use the Developer tools in Word so right-click on your ribbon bar and choose "Customize the Ribbon":Īnd Put a checkmark next to "Developer" and click "OK". So In Word go to File Save As and choose "Word Macro-Enabled Document". You have to enable Marcos for this code to run. I tried this in Word 2010 so I am not 100% that it will work the same in Word 2007 but it probably will. Here is one way to do this by putting the code in the active Word Document. Assuming you do not want to do this manually I beleive the primary way to automate this is to use Word's built-in Visual Basic for Applications programming language and write the script/code to search for the capital letter A and change its color. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |