Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2020, 03:44 AM
Guessed's Avatar
Guessed Guessed is offline Using If Then with Bookmarks to specify text Windows 10 Using If Then with Bookmarks to specify text Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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


I missed adding .Range on the end of that line. Try altering it to read

Set oRng = .Bookmarks(sName).Range
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 08-26-2020, 06:05 AM
RedZed1100 RedZed1100 is offline Using If Then with Bookmarks to specify text Windows 10 Using If Then with Bookmarks to specify text Office 2016
Novice
Using If Then with Bookmarks to specify text
 
Join Date: Aug 2020
Location: England
Posts: 8
RedZed1100 is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
I missed adding .Range on the end of that line. Try altering it to read

Set oRng = .Bookmarks(sName).Range
Thanks. It wasn't obvious -not to me anyway.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing text held in all bookmarks THH4929 Word VBA 6 06-02-2018 04:29 AM
Using If Then with Bookmarks to specify text How to insert bookmarks for content or Text of ContentControl lvganesh Word VBA 5 12-12-2017 11:27 PM
Using If Then with Bookmarks to specify text Deleting only all bookmarks contents not the bookmarks adilprodigy Word VBA 1 10-11-2017 01:31 PM
Macro to hide/unhide text to call variable bookmarks Dr. Z Word VBA 2 05-27-2017 08:20 PM
Using If Then with Bookmarks to specify text Form updating Bookmarks - writes to the bookmarks multiple times PeterPlys Word VBA 13 01-14-2015 06:41 AM

Other Forums: Access Forums

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