#16
|
||||
|
||||
You might try changing:
Code:
.Text = "\([A-Z0-9][A-Z&0-9]{1" & Application.International(wdListSeparator) & "}\)" Code:
.Text = "\([A-Z0-9][A-Z&0-9]@\)" Beyond that, I think we'd need to see an extract from the document demonstrating the issue. You can, of course, obfuscate any other content you wish to keep private.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#17
|
|||
|
|||
Limiting the acronym
Hi.
New to the forum and new to VBA coding. I had created a macro to produce acronyms and their definition but was very code heavy and not as efficient as this code. I have tried to limit the acronym length e.g. find acronyms 1-9 letters but I can't seem to do that with the wdlistseperator. Any advice greatly appreciated. |
#18
|
||||
|
||||
You could, for example, change:
Code:
.Text = "\([A-Z0-9][A-Z&0-9]{1" & Application.International(wdListSeparator) & "}\)" Code:
.Text = "\([A-Z0-9][A-Z&0-9]{1" & Application.International(wdListSeparator) & "9}\)"
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#19
|
|||
|
|||
Thank you for taking the time to reply.
I thought I had tried that combination but with no joy, it works though! The reason why I wanted to limit the string length is that the Find would find items in brackets that were not acronyms e.g. (Document 12345678). This has now resolved the issue. Again, many thanks. |
#20
|
||||
|
||||
I can't see how that is possible, since the Find expression in the code I posted excludes strings with spaces in them. Moreover, the alpha part of any such string must be all upper-case. Your (Document 12345678) example violates both criteria.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#21
|
|||
|
|||
Yes, I have not used your macro explicitly, it has been modified as the field I work in does have spaces between the Acronym itself (within the brackets); my previous version did not use the operator and I simply had the number to find and a total length {1, 9}. It works fine now with the limited testing I have done today. Again, thanks for the swift and accurate response.
|
#22
|
|||
|
|||
This macro is EXCELLENT!
I do have one question though, in my document a lot of acronyms are just dropped in with no definition and they are not in parenthesis, so they aren't getting picked up by the macro. Any way to adjust so it grabs these? I tried looking into wildcards and the code, but this is beyond my expertise. Thanks! |
#23
|
|||
|
|||
I created a simple WORD doc to test this before i use it on my large doc, but i am getting a an error
Compile error: Sub of Function not defined and points to "ParseNumSeq"" In my case, the content will be introduced followed by the Acronym. Japanese American Goodwill Association (JAGA). |
#24
|
|||
|
|||
Quote:
|
Tags |
acronymlister macro |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding List Number to Acronym Table | SerenityNetworks | Word VBA | 6 | 12-13-2016 01:36 PM |
Random Name Generator | knp11 | Word | 1 | 01-18-2015 11:41 AM |
Need guidance on creating a Word doc generator | mikeman | Word VBA | 1 | 10-26-2014 10:35 PM |
Acronym Finder | Cray_Z | Word VBA | 14 | 09-22-2014 11:42 PM |
Document Generator | HJJ | Word | 0 | 08-12-2009 03:28 AM |