QUESTION: I would like to know how to create a loop to find/select a range of data and apply a character style. Each range is identifiable by a start and end tag. For example: aCS1a the text between these aCS1a and zCS1z tags is formatted with a Character Style named cs1 that already exists in the Word document zCS1z
The process so far: (1) A database exports a text file with "tags" that are used to identify formatting for paragraph styles and character styles. (2) A macro in Microsoft Word formats each paragraph with a specific Paragraph style.
Help required please: (3) Next I want to select each instance of aCS1aThe text to be formatted goes herezCS1z and apply the Character style with name "cs1" to the text between the aCS1a and zCS1z tags.
For example: Candidates presented by the aCS1aDean of the Krusty Clown SchoolzCS1z, aCS2aProfessor Homer SimpsonzCS2z, aCS1aBSc(Hons)zCS1z aCS2aSpringfieldzCS2z, aCS1aPhDzCS1z aCS2aShelbyvillezCS2z.
Sorry I had to change the "tags" to aCS1a and zCS1z because angle brackets enclosing the tag got mangled in the preview.
Where: cs1 = a specific Character Style in the Microsoft Word document and cs2 = a different Character Style in the Microsoft Word document
The loop in the macro can remove the aCS1a zCS1z, aCS2a zCS2z "tags" as they are formatted with the appropriate Character Style or I can record a Find/Replace macro to remove the tags as the final step of the processing.