Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-01-2010, 07:53 AM
Takket Takket is offline Help with a macro Windows XP Help with a macro Office 2000
Novice
Help with a macro
 
Join Date: Jan 2010
Posts: 2
Takket is on a distinguished road
Default Help with a macro

I wrote this macro to find all the hidden text in a document, and replace it with nothing (delete it). The problem is, it is doing the EXACT OPPOSITE. It is finding all the NOT hidden text and deleting it. After I run the macro, if I click on "Edit-Replace" it says "Not Hidden" in the find window. It should just say "Hidden." What am I doing wrong?

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ""
.Font.Hidden = True
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False


.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with a macro Macro Tutorials TAFE Word 4 11-04-2009 02:50 AM
Macro library pankajkankaria Excel 1 04-12-2009 09:06 AM
macro on checkbox macrohelp Word VBA 0 03-06-2009 03:33 PM
Unable to run the specified macro jtrirogoff Word 0 02-05-2009 04:38 PM
Macro Issue Basanth Excel 1 12-05-2008 08:07 PM

Other Forums: Access Forums

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