Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-01-2020, 06:40 PM
bscott221 bscott221 is offline Search Button Windows 10 Search Button Office 2019
Novice
Search Button
 
Join Date: Jun 2020
Posts: 1
bscott221 is on a distinguished road
Default Search Button

I want to create a Text box and Search button in ms word. When I enter text in the search box and click the search button the code should find the text searched for. I tried the following code but it is not working.



Public Sub FindWord(sWord As String)
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting


.Text = sWord
.Execute
End With
End Sub


Any help would be greatly appreciated. Thank you.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Use CSV as search criteria for Outlook search folder lonesoac0 Outlook 0 03-07-2016 02:31 PM
Filter Search Button lonniepoet Excel Programming 53 12-23-2015 02:27 PM
Onenote 2013 search is not identifying search terms correctly Delta223 OneNote 0 08-12-2014 06:40 AM
Search for date and then apply mutliple search criteria in huge dataset maxtymo Excel 2 12-01-2013 04:52 AM
Looking for Windows Search app with ability to search by content gopher_everett Office 1 02-28-2013 09:23 PM

Other Forums: Access Forums

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