Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2004

Tip: Looking for answers? Try searching our database.

Att: Helmet. Search changes font size.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Neve - 14 Nov 2004 10:33 GMT
Hi

I asked a question last week and I have since managed to tidy up my macros
as I was no longer sure whether the macros assigned to 'new macros' or 'this
document' or referenced to the .dot was the macro which was running when I
clicked on my tool bar.

So I can now say with certainty that the macro below is the 'guilty' macro.

When searching for words, it changes the font size which might be
16, 14, 12, 10 , for a four lettered word (falling tone) to 12,12,12,12,
(normal font size which I happen use for flat tones).

This possibly didn't show up in my question if you don't allow .html.

Any ideas which line could be doing this?

Thanks

Sub Highlight()
Dim sSrc As String
Options.DefaultHighlightColorIndex = wdYellow
sSrc = Selection.Text
Resetsearch
Selection.SelectColumn
With Selection.Find
   .Text = sSrc
   .Replacement.Text = sSrc
   .Replacement.Highlight = True
   .MatchWholeWord = True ' or true if you like
   .Wrap = wdFindStop ' !!!
   .Execute Replace:=wdReplaceAll
End With
Resetsearch
End Sub

Sub Resetsearch()
With Selection.Find
   .ClearFormatting
   .Replacement.ClearFormatting
   .Text = ""
   .Replacement.Text = ""
   .Forward = True
   .Wrap = wdFindContinue
   .Format = False
   .MatchCase = False
   .MatchWholeWord = False
   .MatchWildcards = False
   .MatchSoundsLike = False
   .MatchAllWordForms = False
   .Execute
End With
End Sub
Helmut Weber - 14 Nov 2004 19:41 GMT
Hi Dave,
did you try the alternative I posted on Nov 12th?
Besides that, both approaches do work here and now.
Kind of hard to trap an error or misbehaviour,
if it doesn't show.
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.