msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Find / Replace Underline with Border (Word 2003)

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax
Author Message
fatherunit



Joined: 04 Oct 2007
Posts: 1

PostPosted: Tue Jul 11, 2006 5:20 am    Post subject: Find / Replace Underline with Border (Word 2003) Reply with quote

Status: rookie

I'm trying to create a macro in Word 2003 that finds all text with a specific
font formatting,
and once found, creates a border around it. Each time I record a macro that
does this
and then try to execute the macro just created it doesn't do anything. Here
an example:

the following macro was created by "finding" text with white color font +
shadowed text,
but I don't see anything in the code that indicates that I made the search
iwth those criteria:

Sub FindWhiteShadow_BoxBlue()
'
' FindWhiteShadow_BoxBlue Macro
' Macro recorded 7/10/2006
'
Selection.ShapeRange.Select
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
With Selection.Font
With .Borders(1)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth025pt
.Color = wdColorLightBlue
End With
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleSingle
.DefaultBorderLineWidth = wdLineWidth025pt
.DefaultBorderColor = wdColorLightBlue
End With
End Sub

ANY suggestions would be appreciated. Thank you.

Archived from group: microsoft>public>vb>syntax
Back to top
View user's profile Send private message
Jeff Johnson



Joined: 04 Oct 2007
Posts: 1327

PostPosted: Tue Jul 11, 2006 1:26 pm    Post subject: Re: Find / Replace Underline with Border (Word 2003) Reply with quote

"fatherunit" wrote in message @uwe...

> Status: rookie
>
> I'm trying to create a macro in Word 2003

news://microsoft.public.word.vba.beginners

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
too many replace statement hello everyone. anyone can help me make the code shorter (i try select case but fail): Do Until "sheep") = 0 text1.text = "sheep", "goal") Loop Do Until "horse") = 0 text1.text =

Problem with replace function Hi, i have a problem with my part of code when i used Replace funtion. The problem it's when in the line i have the same string two times, he don't replace the unique place i want but he replace all the line. Ex.: the line it's : 250105 280105 044 when th

String.Replace not working??? This is so bizarre I hesitate to post it, but I need to get this working. My code looks like this... Private Const = "SELECT * FROM TResources" & _ " WHERE Scenario = @Scenario" Dim cmdstr as String cmdstr = If his

replace multiple strings Hello, I'm having trouble writing the code to replace three different strings in a small text file. I want to replace all occurances of: sugar, candy; flour, pillsbury; and cornstarch, armandhammer with sugar candy; flour pillsbury; cornstarch armandhamm

Replace String in a text file I need Help ! Hi, I have abolutely need help, i have need to replace a part of string in one line in a text file and i have a problem to resolve. For example my text file contains this: 1. I have a problems with my visualbasic code. 2. I don't know what is the solution
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group