Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-21-2024, 05:13 AM
capitala capitala is offline Find code is not working in some word lines Windows 7 64bit Find code is not working in some word lines Office 2003
Advanced Beginner
Find code is not working in some word lines
 
Join Date: Nov 2013
Posts: 38
capitala is on a distinguished road
Default Find code is not working in some word lines

Good day! I beg your patience:

I made a code in (word VBA) to search for the letter ':' and then do something (like Bold format)

the code is working perfect in tables. BUT in a normal text, if there's two ':' in the same line, the full line is excluded from the action.
Example:

Before Code:

Name:

Nationality:

Address: City:



ID No.:



After Code:

Name:

Nationality:


Address: City:

ID No.:



as you see, in the line starting with: Address, no effect at all



Here's the code:

Dim bWC As Boolean
Dim oRng As Word.range
Set oRng = ActiveDocument.range
With oRng.Find
.MatchWildcards = True
.Text = ":"
.Format = True
.Wrap = wdFindStop

While .Execute
oRng.Select
............
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word VBA code unable to find Bookmark Useful Word VBA 9 07-19-2023 10:42 PM
Find code is not working in some word lines Find and Replace Code Not Working falcios Word 11 06-23-2021 12:39 AM
Find code is not working in some word lines PRINT field code in Word document not working as expected smccaffr39 Word 3 02-19-2020 02:46 PM
Find code is not working in some word lines VBA Code for Grammar Check Not Working in Word 2016 PSSMargaret Word VBA 2 06-11-2016 10:53 PM
MS Word Find and Replace not working allenglishboy Word 10 07-25-2012 08:05 AM

Other Forums: Access Forums

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