Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 07-13-2025, 04:27 AM
macropod's Avatar
macropod macropod is offline Macro for creating bookmarks Windows 10 Macro for creating bookmarks Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Susan,

In my code, the Style to search for is defined in the line:
.Style = "myStyle"

With Word's Find.Execute method, the found range automatically becomes the active range. And, when the Bookmarks.Add method is invoked without specifying the range to bookmark, it bookmarks the active range. I could have added .Duplicate as the optional Range parameter, but that would have been redundant.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for creating bookmarks Creating a Macro in VBA where a Dropdown Box Populates Text Bookmarks below roseheller Word VBA 5 02-23-2021 03:10 PM
Macro to hide/unhide text to call variable bookmarks Dr. Z Word VBA 2 05-27-2017 08:20 PM
Macro for creating bookmarks Transfer word doc bookmarks to excel using macro Bedsy Word VBA 4 03-15-2015 10:58 PM
Macro for creating bookmarks Form updating Bookmarks - writes to the bookmarks multiple times PeterPlys Word VBA 13 01-14-2015 06:41 AM
Macro for creating bookmarks Macro to list all bookmarks Marrick13 Word VBA 4 02-09-2012 08:00 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:58 PM.


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