Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 03-06-2020, 02:54 PM
marceepoo marceepoo is offline Help using VBA to find a hidden text string Windows 7 64bit Help using VBA to find a hidden text string Office 2010 64bit
Novice
Help using VBA to find a hidden text string
 
Join Date: Sep 2012
Posts: 22
marceepoo is on a distinguished road
Smile The Demo() macro did not create a new bookmark "LastEntryThusFarMadeInTblOfExhibits"

The Demo() macro did remove the preexisting bookmark "LastEntryThusFarMadeInTblOfExhibits", but did the macro did not create a new bookmark "LastEntryThusFarMadeInTblOfExhibits".

I bet your next response will accomplish that.

But alas, no good deed goes unpunished.

Your Demo() macro contained a lot of code that I do not understand ... because I do not understand how ranges work, and I have never found a tutorial explaining ranges (and how to use them) that I could understand enough to be able to use ranges.

I think your code between the line:
Do While .Find.Found
and the line:
If Not RngFnd Is Nothing Then .Bookmarks.Add Name:="LastEntryThusFarMadeInTblOfExhibits", Range:=RngFnd
was intended to do the following:
1. Create something analogous to a "selection point" at the place in the document where the search found the text "[FULLNAME: PDF] ", and
2. Create the new bookmark "LastEntryThusFarMadeInTblOfExhibits" at that new "selection point"
... or something like that.

I would like the macro to insert the new bookmark "LastEntryThusFarMadeInTblOfExhibits" in column #1 on the first line of the next Heading 1 where the search found the text "[FULLNAME: PDF] " (i.e., the Heading 1 paragraph, where the search found the text "[FULLNAME: PDF] ", after the Heading 1 paragraph where the preexisting bookmark "LastEntryThusFarMadeInTblOfExhibits" had been, before it was deleted by the macro).

But even more than that, I would like to understand how to do it.
So, I would appreciate any suggestions (e.g., online tutorials or Reference URLs, or Google search words) you could give me to help me find materials so that I could understand how you are using the "range" thing to get where we want to be.

Lastly, can you only have one range in existence at a time?
One more thing, why is the sky blue?

Thanks again,
Marc
Reply With Quote
 

Tags
hidden text, vba code, vba find and replace



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find all string within string. PRA007 Word VBA 18 02-12-2016 08:11 PM
VBA to Find and Format Text string defined using Inputbox within selection sistemalan Word VBA 7 10-03-2014 07:28 AM
Help using VBA to find a hidden text string Way to search for a string in text file, pull out everything until another string? omahadivision Excel Programming 12 11-23-2013 12:10 PM
Help using VBA to find a hidden text string Find and replace a string of text errtu Word 1 01-31-2013 02:09 PM
Help using VBA to find a hidden text string Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

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