Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-11-2014, 03:07 PM
rsrasc rsrasc is offline Find/Replace Wildcard Needed-Bold & Highlight Windows 7 64bit Find/Replace Wildcard Needed-Bold & Highlight Office 2010 64bit
Competent Performer
Find/Replace Wildcard Needed-Bold & Highlight
 
Join Date: Mar 2014
Location: Germany
Posts: 148
rsrasc is on a distinguished road
Default

Good point, and I agreed. Not trying to get "free" advise without me doing my homework or putting a good effort. I do.

Before posting anything, I spent a good amount of hours searching the net and your site for answers.


Unfortunately, I don't have the necessary skills to come out sometimes with a workable code or solution.

Yesterday, you gave me a workable find/replace code; I try to modify it for something else--spent more than two hours trying to find a solution but couldn't do it.

Anyway, please accept my apologies, and as always I thank you for your valuable cooperation.

Here is a sample code I found on the web so I can bold what I want. Still working on the color issue.

Sincerely


PHP Code:
Sub BoldText()
'
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchWildcards = True
    .Text = "Answer: A"
    .Replacement.Text = ""
    .Replacement.Font.Bold = True
    .Execute Replace:=wdReplaceAll
    .Text = "Answer: B"
    .Replacement.Text = ""
    .Replacement.Font.Bold = True
    .Execute Replace:=wdReplaceAll
    .Text = "Answer: C"
    .Replacement.Text = ""
    .Replacement.Font.Bold = True
    .Execute Replace:=wdReplaceAll
    .Text = "Answer: D"
    .Replacement.Text = ""
    .Replacement.Font.Bold = True
    .Execute Replace:=wdReplaceAll
    .Forward = True
    .Wrap = wdFindContinue
    .MatchWholeWord = True
    .Execute Replace:=wdReplaceAll
   End With
End With
Application.ScreenUpdating = True
End Sub 
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find/Replace Wildcard Needed-Bold & Highlight New Find/Replace Wildcard Needed rsrasc Word VBA 2 11-11-2014 09:46 AM
Find/Replace Wildcard Needed-Bold & Highlight Wildcard Find and Replace Ulodesk Word 1 06-23-2014 10:26 AM
Wildcard Find/Replace deletes extra character Cosmo Word 1 06-20-2014 08:49 AM
Find/Replace Wildcard Needed-Bold & Highlight Need help using WildCard Find & Replace Cayce Word 1 06-09-2014 04:17 PM

Other Forums: Access Forums

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