Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 04-01-2022, 04:15 PM
macropod's Avatar
macropod macropod is offline Acronym and definiton list generator Windows 10 Acronym and definiton list generator Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


You might try changing:
Code:
.Text = "\([A-Z0-9][A-Z&0-9]{1" & Application.International(wdListSeparator) & "}\)"
to:
Code:
.Text = "\([A-Z0-9][A-Z&0-9]@\)"
though I doubt that would make much difference.

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]
Reply With Quote
  #17  
Old 10-30-2022, 01:38 AM
jabanks jabanks is offline Acronym and definiton list generator Windows 11 Acronym and definiton list generator Office 2021
Novice
 
Join Date: Oct 2022
Posts: 3
jabanks is on a distinguished road
Exclamation 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.
Reply With Quote
  #18  
Old 10-30-2022, 05:31 AM
macropod's Avatar
macropod macropod is offline Acronym and definiton list generator Windows 10 Acronym and definiton list generator Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could, for example, change:
Code:
.Text = "\([A-Z0-9][A-Z&0-9]{1" & Application.International(wdListSeparator) & "}\)"
to:
Code:
.Text = "\([A-Z0-9][A-Z&0-9]{1" & Application.International(wdListSeparator) & "9}\)"
This will limit the find string to a maximum of 9 characters. Such a limitation seems fairly meaningless, however, as few words would be longer than that and, if you have many parenthetic uppercase single words, those will all be included in the output.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #19  
Old 10-30-2022, 08:15 AM
jabanks jabanks is offline Acronym and definiton list generator Windows 11 Acronym and definiton list generator Office 2021
Novice
 
Join Date: Oct 2022
Posts: 3
jabanks is on a distinguished road
Default

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.
Reply With Quote
  #20  
Old 10-30-2022, 02:13 PM
macropod's Avatar
macropod macropod is offline Acronym and definiton list generator Windows 10 Acronym and definiton list generator Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by jabanks View Post
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).
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]
Reply With Quote
  #21  
Old 10-30-2022, 02:35 PM
jabanks jabanks is offline Acronym and definiton list generator Windows 11 Acronym and definiton list generator Office 2021
Novice
 
Join Date: Oct 2022
Posts: 3
jabanks is on a distinguished road
Default

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.
Reply With Quote
  #22  
Old 02-27-2023, 09:37 AM
Krunchy Krunchy is offline Acronym and definiton list generator Windows 11 Acronym and definiton list generator Office 2021
Novice
 
Join Date: Dec 2022
Posts: 1
Krunchy is on a distinguished road
Default

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!
Reply With Quote
  #23  
Old 02-13-2024, 04:03 PM
skylinekiller skylinekiller is offline Acronym and definiton list generator Windows 10 Acronym and definiton list generator Office 2016
Novice
 
Join Date: Nov 2019
Posts: 5
skylinekiller is on a distinguished road
Default

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).
Attached Files
File Type: docm The Japanese American Goodwill Association.docm (20.4 KB, 1 views)
Reply With Quote
  #24  
Old 02-14-2024, 06:21 AM
Italophile Italophile is online now Acronym and definiton list generator Windows 11 Acronym and definiton list generator Office 2021
Expert
 
Join Date: Mar 2022
Posts: 338
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by skylinekiller View Post
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).
You are getting the error because you haven't copied all the code. You need both lots of code from post 2
Reply With Quote
  #25  
Old 02-14-2024, 08:50 AM
skylinekiller skylinekiller is offline Acronym and definiton list generator Windows 10 Acronym and definiton list generator Office 2016
Novice
 
Join Date: Nov 2019
Posts: 5
skylinekiller is on a distinguished road
Default

Quote:
Originally Posted by Italophile View Post
You are getting the error because you haven't copied all the code. You need both lots of code from post 2
Guess my elevator wasn't going all the way to the top.. Thank you!
Reply With Quote
Reply

Tags
acronymlister macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Acronym and definiton list generator Adding List Number to Acronym Table SerenityNetworks Word VBA 6 12-13-2016 01:36 PM
Acronym and definiton list generator Random Name Generator knp11 Word 1 01-18-2015 11:41 AM
Acronym and definiton list generator Need guidance on creating a Word doc generator mikeman Word VBA 1 10-26-2014 10:35 PM
Acronym and definiton list generator Acronym Finder Cray_Z Word VBA 14 09-22-2014 11:42 PM
Document Generator HJJ Word 0 08-12-2009 03:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:10 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft