Great Video, 12:09 into the video and I got exactly what I wanted help me so much and saved so much time. after spending a week searching online for something similar. Great explanation as well.
In the "simple" example in the line " 'Define the Find Object based on the range " Set wrdFind = wrdRng.Find ; I get Compile Error, Argument not optional. What does it mean?
Great video and a good presenting style. In the complex example you declare - Dim wordSearhcList as variant and the script still worked. I dont mind how but why if it has a spelling mistake that isn't replicated in the rest of the code?
I have been playing around with the find object but somehow when looking up all instances of a specific style (for example heading 7) in a document the loob gets stuck when the style is placed in a content control. What is going on there ? Text searches seem to work flawlessly in that case. Nice content
I'd have to look at the code specifically to see what's going on. My guess is that content control is causing it to error out, my suggestion is to skip over those objects in your loop.
First of all, thanks a lot, It really helped. Secondly, I have a request. Would you mind telling me How can I select all the parapraphs in a document containing a given word? For example, How can I select all the paragraph containing the word "References" ?
Im trying to use the find methods to search in a word the values in one table in excel for the values in another table in excel. But is not going inside a table that is in the word. How can I fix this?
Hi, I have 1000 pages in word document In that 1st page has two highlighted word in two different places And I want to highlight rest 999 page at exact the same location ... Can you please share the VBA code for that
So if you want your next search to pick up where the last one left off don't set a user defined range. Use the find property of the document instead and reference the parent object. The example code below will find the next result in the document every time it is run. With ActiveDocument.Content.Find .Text = "blue" .Forward = True .Execute If .Found = True Then .Parent.Bold = True End With
Great Video,
12:09 into the video and I got exactly what I wanted help me so much and saved so much time.
after spending a week searching online for something similar.
Great explanation as well.
Thank you for this video! VBA Find has been driving me crazy, so I'm glad to have found this :)
In the "simple" example in the line " 'Define the Find Object based on the range " Set wrdFind = wrdRng.Find ;
I get Compile Error, Argument not optional.
What does it mean?
really nice tutorial and thank you so much
Nicely explained - thank you!
Congratulations. I really enjoyed your video. !!!
Great video and a good presenting style. In the complex example you declare - Dim wordSearhcList as variant and the script still worked. I dont mind how but why if it has a spelling mistake that isn't replicated in the rest of the code?
I have been playing around with the find object but somehow when looking up all instances of a specific style (for example heading 7) in a document the loob gets stuck when the style is placed in a content control. What is going on there ? Text searches seem to work flawlessly in that case. Nice content
I'd have to look at the code specifically to see what's going on. My guess is that content control is causing it to error out, my suggestion is to skip over those objects in your loop.
Thanks so much. I enjoyed the video.
Glad you enjoyed it!
First of all, thanks a lot, It really helped.
Secondly, I have a request. Would you mind telling me How can I select all the parapraphs in a document containing a given word?
For example, How can I select all the paragraph containing the word "References" ?
Thanks for the video. How to use regular expressions on a find object ?
Can you please tell how we can find all the headings 1 from the document and edit them.?
Im trying to use the find methods to search in a word the values in one table in excel for the values in another table in excel. But is not going inside a table that is in the word. How can I fix this?
Can you please tell, How to find the particular section and delete that section?
Hi,
I have 1000 pages in word document
In that 1st page has two highlighted word in two different places
And I want to highlight rest 999 page at exact the same location ...
Can you please share the VBA code for that
I ran your code in word 365 enterprise and the simple one worked but then I went to the intermediate one and it won't change the color
I think it's funny you ignored the one thing I wanted to know. Moving the range to the next word instead of resetting it. But still interesting.
So if you want your next search to pick up where the last one left off don't set a user defined range. Use the find property of the document instead and reference the parent object. The example code below will find the next result in the document every time it is run.
With ActiveDocument.Content.Find
.Text = "blue"
.Forward = True
.Execute
If .Found = True Then .Parent.Bold = True
End With