Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2024, 05:48 PM
tonykekw tonykekw is offline Testing Bookmarks and Cross-Refrences VBA Script Windows 11 Testing Bookmarks and Cross-Refrences VBA Script Office 2021
Novice
Testing Bookmarks and Cross-Refrences VBA Script
 
Join Date: Jan 2024
Posts: 13
tonykekw is on a distinguished road
Post Testing Bookmarks and Cross-Refrences VBA Script

Hello, I know this has been answered in some way by @Macropod, that very neatly summarizes a Word Doc's Bookmarks and Cross-Refrences. However Looking at their work and trying to modify it to better suite my needs has been challenging. Before I found their post I was looking around and testing diffrent VBA Scripts. I cannot for the life of me figure it out.



My Problem is that I have a huge Word document with many Bookmarks and Crossrefrences. The document is ever changing and always being modified. I need a way to list all of my Bookmarks and Cross-Refrences, so that I may test them and see if they still work and/or need to be updated.

I've tried many diffrent ways including looking at the XML data and so on. Thanks again and if anyone has other ideas please feel free to suggest them.
Reply With Quote
  #2  
Old 01-21-2024, 04:27 PM
Guessed's Avatar
Guessed Guessed is offline Testing Bookmarks and Cross-Refrences VBA Script Windows 10 Testing Bookmarks and Cross-Refrences VBA Script Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

What is your definition of a working cross-reference? If it points at a non-existent bookmark then the xRef will return an Error message in the document. If the bookmark has expanded because of someone pasting content at the start of a bookmark then it can be much harder to spot unless it is now displaying a '0' paragraph number.

Maybe a sensible workflow would be to run a macro to highlight all xRef fields and then run a find to jump from highlight to highlight and let you eyeball the field result in context before jumping to the next one.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 01-21-2024, 09:05 PM
tonykekw tonykekw is offline Testing Bookmarks and Cross-Refrences VBA Script Windows 11 Testing Bookmarks and Cross-Refrences VBA Script Office 2021
Novice
Testing Bookmarks and Cross-Refrences VBA Script
 
Join Date: Jan 2024
Posts: 13
tonykekw is on a distinguished road
Default

It seems that I confused myself and everyone as well. I guess what I am trying to do is not only list out all of my bookmarks and cross-references but also list out all of the linked words/phrases. I have some values that lead out to external websites and some that go to a directory. I would like a list so that I can test the external links and the ones that point to a location in the files.

I was messing around with using chatgpt to write some VBA but i was reading that it is not very good at writing correct code.
Reply With Quote
Reply

Tags
help please, vba script



Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing Bookmarks and Cross-Refrences VBA Script 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
Cross Referencing Bookmarks populated from a userform Word 2010 arbluecreek Word VBA 6 06-05-2015 05:29 AM
Cross-referencing Bookmarks and Formatting kd12 Word 6 06-09-2014 09:20 PM
Testing Bookmarks and Cross-Refrences VBA Script Bookmarks & cross-references Suchoklates Word 1 09-19-2013 02:32 AM

Other Forums: Access Forums

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