Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2024, 02:49 PM
ctviggen ctviggen is offline Code that changes hidden bookmarks/cross-references works...sometimes Windows 10 Code that changes hidden bookmarks/cross-references works...sometimes Office 2016
Advanced Beginner
Code that changes hidden bookmarks/cross-references works...sometimes
 
Join Date: Feb 2021
Posts: 54
ctviggen is on a distinguished road
Default

After thinking about this, what I probably did was the following. Rebooted my computer, determined the code didn't work at all (because hidden bookmarks weren't being shown). Incredulous (since I had been working on other parts of the code for hours), I then put a break after the first set of bookmark manipulations. Those didn't work, but to check, I had to show the hidden bookmarks. I then finished running the code, and it appeared the second set of bookmark manipulations worked...because they did because hidden bookmarks were no longer hidden.





And I did something similar at home and at work, never realizing that every time I went to debug this, I showed hidden bookmarks, which allowed the code (or part of it, depending on where I put a break) to work.



I never realized it until I stumbled upon it today, then I tested it by turning on showing hidden bookmarks manually after a reboot before running the code. Then the code worked.


I asked ChatGPT how to enable bookmarks via VBA, and got two wrong answers. I did a search and found Microsoft's discussion of this, and used their code (the code I show above). Sometimes, ChatGPT is helpful, but many times, it's not.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Code that changes hidden bookmarks/cross-references works...sometimes 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
Convert manual cross references in footnotes to other footnotes to automatic cross references ghumdinger Word VBA 7 11-20-2014 11:47 PM
Code that changes hidden bookmarks/cross-references works...sometimes Bookmarks & cross-references Suchoklates Word 1 09-19-2013 02:32 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 05: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