Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Abbreviations and Acronyms Table - Auto Compile

Abbreviations and Acronyms Table - Auto Compile

Abbreviations and Acronyms Table - Auto Compile

Big document - over 150 pages - with LOADS of Acronyms and Abbreviations. Table at the end listing them all. How can I make sure I get every initial (no pun intended) occurrence of an abbreviation and put it in the table? Also, check the other way, to make sure every abbreviation defined in the table is in the document.


Someday I'll know what I'm donig...damn!

RE: Abbreviations and Acronyms Table - Auto Compile



Sub Demo()
Application.ScreenUpdating = False
Dim RngDoc As Range, oTbl As Table, strFnd As String, i As Long
With ActiveDocument
  Set oTbl = .Tables(.Tables.Count)
  Set RngDoc = ActiveDocument.Range
  RngDoc.End = oTbl.Range.Start
  For i = 2 To oTbl.Rows.Count
    With oTbl.Cell(i, 1).Range
      strFnd = Left(.Text, Len(.Text) - 2)
    End With
    With RngDoc
      With .Find
        .Format = False
        .Text = strFnd
        .MatchWholeWord = True
        .MatchWildcards = False
        .MatchCase = True
      End With
      If .Find.Found = True Then
        oTbl.Cell(i, 2).Range.Text = .Information(wdActiveEndAdjustedPageNumber)
      End If
    End With
End With
Application.ScreenUpdating = True
End Sub 
The code assumes the acronyms are in the first column and the initial page # is to appear in the second column.

As for the second problem, you might try something based on the discussion starting at: https://windowssecrets.com/forums/showthread.php/1...

Paul Edstein
[MS MVP - Word]

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close