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 / February 2006

Tip: Looking for answers? Try searching our database.

font color

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MarcoPolo - 14 Feb 2006 18:49 GMT
how can i change color for example font.color = wdColorRed
for the text i replace?

like this

Dim rDcm As Range
Set rDcm = ActiveDocument.Range
With rDcm.Find
     .Text = strfind
     .Replacement.Text = strReplace
     .Execute Replace:=wdReplaceAll

 ....

end with

tia Marco
Tony Jollans - 14 Feb 2006 18:56 GMT
Just add a line ...

Dim rDcm As Range
Set rDcm = ActiveDocument.Range
With rDcm.Find
     .Text = strfind
     .Replacement.Text = strReplace
     .Replacement.Font.Color = wdColorRed ' <====== Added
     .Execute Replace:=wdReplaceAll

 ....

end with

--
Enjoy,
Tony

> how can i change color for example font.color = wdColorRed
> for the text i replace?
[quoted text clipped - 13 lines]
>
> tia Marco
MarcoPolo - 14 Feb 2006 19:12 GMT
Cool, i didnt find replacement.font.color
Thanks!

> Just add a line ...
>
[quoted text clipped - 31 lines]
>>
>> tia Marco
 
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.