Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-18-2022, 02:17 AM
Winrow Winrow is offline List acronyms from selected tables after them with style Windows 10 List acronyms from selected tables after them with style Office 2016
Novice
List acronyms from selected tables after them with style
 
Join Date: Jun 2022
Posts: 5
Winrow is on a distinguished road
Question List acronyms from selected tables after them with style

Hello everyone,



I've been trying to adapt to my needs the acronymlister macros I could find but I am stuck.

I have Word tables containing acronyms of 3 uppercase letters or more. I would like to run the macro on selected tables to find the acronyms within it and to list them right after each table. The list of acronyms should be formatted as
Quote:
ABC =
, use semi-colon as separator and, if at all possible, applied the Word style
Quote:
legend
.

Please find below the code I have been working on. I annotated where I think the code should be changed. Other options are welcome

Code:
Sub ACRO_table

Dim oTbl as Table
Dim oCel as Cell
Dim oRange as Range

For Each oTbl in Selection.Range.Tables
For Each oCel In oTbl.Range.Cells

With oCel.Range
With .find .text = "<[A-Z]{3,}>" .forward = True .Wrap = wdFindStop .Format = False .MatchCase = True .MatchWildCards = True
Do While .Execute ' the following lines of code are wrong i.e. it copies the found acronyms in new cells with new cells oTbl.Range.collapse wdCollapseEnd oTbl.Range.Copy oCel.Range.PasteAndFormat (wdTableOriginalFormatting) Loop End with End with Next oCel Next oTbl
Many thanks in advance.

Winrow

Last edited by Winrow; 06-18-2022 at 02:18 AM. Reason: typo in title
Reply With Quote
 

Tags
acronymlister macro, word table



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross-reference with full context a numbered list inside another multilevel list (list style) MatLcq Word 0 02-01-2021 06:00 AM
List acronyms from selected tables after them with style Creating a list of Acronyms / Abbreviations daithy Word 4 03-12-2020 01:52 PM
numbered list: bold when selected and fade when selected following number village PowerPoint 0 11-08-2017 10:43 AM
List acronyms from selected tables after them with style Macro to create list of acronyms lsmcal1984 Word 3 09-04-2013 07:33 AM
List acronyms from selected tables after them with style Macro to apply style to selected tables ubns Word 1 08-02-2012 04:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:34 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