Want to be able to auto-generate acronym lists

Where I work we have to create acronym glossaries unique to some of our courses and it would save a LOT of time if Lectora Publisher could do the following procedure with a simple menu command:



1) search though all the text in the document and extract copies of all strings containing only capital letters (or better, non-lower case letters to allow for the characters -/0123456789() )



2) remove all duplicates from that list of strings and



3) export the de-duplicated list to a text file with CR (carriage return) after each string. (prompt user for file name).



Tech support suggested I write my own script. But I don't see how I'd run the script or macro inside lectora to do all the above. Was the intent that I'd run some kind of MS-Word macro on a backup copy of my .awt project file?



I've found that leads to a lot of stuff being selected as acronyms which aren't, because of capitalized HTML tags, especially hex color values (ex. BBEACF). Since the lectora program knows which text is inside text boxes (it must in order for the find command to work) it can confine it's search there and make a cleaner list.



Maybe there's a regular expression I could use in a Word VBA macro that in addition to my other requirements selects only text matching the criteria located inside of the XML tags that indicate. Right now the search term of my word macro looks like the example below. If a developer could help we tweak this to select only text found in text boxes in addition to my existing criteria, that would solve my problem for now.




' Currently the search text selects all strings of characters wich contain
' all uppercase letters OR
' uppercase letters with numbers OR
' uppercase letters with - (hyphen) character in the middle OR
' uppercase letters with numbers with a - (hyphen) in the middle
.Text = "<[A-Z-][A-Z0-9-]{2" & strListSep & "}>"

[/CODE]


Shayne Weyker[CODE]

' Currently the search text selects all strings of characters wich contain

' all uppercase letters OR

' uppercase letters with numbers OR

' uppercase letters with - (hyphen) character in the middle OR

' uppercase letters with numbers with a - (hyphen) in the middle

.Text = "<[A-Z-][A-Z0-9-]{2" & strListSep & "}>"



[/CODE]





Shayne Weyker