Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 12-13-2016, 01:36 PM
SerenityNetworks SerenityNetworks is offline Adding List Number to Acronym Table Windows 10 Adding List Number to Acronym Table Office 2016
Advanced Beginner
Adding List Number to Acronym Table
 
Join Date: May 2005
Location: Allen, Texas, USA
Posts: 37
SerenityNetworks
Thumbs up

Thank you. Please pardon my delay in responding. No excuses; I just got overly busy. I certainly appreciate your work.

The revised macro still throws a runtime error #91, object variable or with block variable not set error when there is more than one line containing an acronym that comes before the first list. For example, in your demo document, add a second line that says, "New line BBB." When the macro is run it errors out at, "Set oRngLP = oRngLP.Paragraphs(1).Previous.Range". My workaround is just to make the first line a list and change it back after the macro runs, but I thought I'd let you know in case others are following this thread.

Then a couple of last thoughts/requests, which are by no means important but would make the macro pretty slick. (1) Sometimes I want listed the appearance of every acronym regardless of how many times it appears. Sometimes (most often) I only want to output the first appearance of an acronym. I wonder if there is an easy way to add code that would restrict the output to only the first instance of the acronym and then comment out the code if I want to output every instance. If it's not easy to do then I can just sort and delete the extras, which is what I have been doing. (2) In using your macro I noted that where I have a sentence or paragraph where every character is in uppercase then all the words 'n' characters in length will be output as acronyms. So I replaced the .text code you had with: .Text = "\([A-Z]{2,}\)" This allows me to only capture acronyms contained within parenthesis. Do you see any issue with this modification?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding tables based on a number given in a form coba Word VBA 5 12-26-2015 07:05 PM
Adding List Number to Acronym Table Acronym Finder Cray_Z Word VBA 14 09-22-2014 11:42 PM
Adding List Number to Acronym Table How to create a table with a number of line depending a number entered by user Cellendhyll Word Tables 3 07-10-2014 05:49 AM
Adding List Number to Acronym Table List Style Numbering picks up out of order number from LATER list spthomas Word 12 12-16-2013 05:23 PM
Adding List Number to Acronym Table Adding Characters to Page Number Daved2424 Word 6 01-22-2011 07:11 PM

Other Forums: Access Forums

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


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