Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-24-2019, 04:01 PM
jeffreybrown jeffreybrown is offline Create bookmarks, links, or references throught doc Windows Vista Create bookmarks, links, or references throught doc Office 2007
Expert
Create bookmarks, links, or references throught doc
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default Create bookmarks, links, or references throught doc

What is the best way to create bookmarks, links, or references throughout a doc?

I have some VBA to extract the references throughout the document that I would like to reference.

Code:
Sub FindInsideParanthesis()
    Dim StrOut As String
    With ActiveDocument
      With .Range
        With .Find
          .Text = "\(*\)"
          .MatchWildcards = True
          .Execute
        End With
        Do While .Find.Found = True
          StrOut = StrOut & vbCr & .Text
          .Collapse wdCollapseEnd
          .Find.Execute
        Loop
      End With
      .Range.InsertAfter StrOut
    End With
End Sub
This will place the references at the end of the document with the parenthesis attached, but I will remove the parenthesis first. I manual setup some examples in this document, but would like to automate this process.
Attached Files
File Type: docx Test Doc.docx (17.5 KB, 10 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Create bookmarks, links, or references throught doc Is there a way to summarise all bookmarks and cross references used in a Word document? Training Word VBA 1 11-09-2017 12:06 AM
Where to put Subroutine to make sure bookmarks aren't deleted so cross-references work mrsjetset Word VBA 5 06-29-2016 05:06 PM
Create bookmarks, links, or references throught doc Bookmarks & cross-references Suchoklates Word 1 09-19-2013 02:32 AM
Links between files to bookmarks in PDF spud098 Word 0 07-14-2010 01:11 AM
Bookmarks with different figure references Dan_68 Word 0 02-15-2010 08:29 PM

Other Forums: Access Forums

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