Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] horridboy@hushmail.com is offline
external usenet poster
 
Posts: 2
Default Macro question

I am trying to get a macro that will highlight every paragraph that
begins with

"Q:"

(omit the quotation marks)

and then italicize it.


Can anyone help?

* * *

I have something like this but it doesn't work

Sub Highlight()
'
' Highlight Macro
' Applies color highlighting to the selection
'
WordBasic.Highlight
Sub Tc()
Selection.HomeKey wdStory
With Selection.Find
.Text = "Q:"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False

Do While .Execute
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.Font.Italic = True
Selection.Collapse wdCollapseEnd
Loop
End With
End Sub

 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Features godmongo Microsoft Word Help 20 July 22nd 06 07:37 AM
Macro execution using MailMerge nelsonj Mailmerge 9 June 13th 06 05:04 PM
macro runs from keyboard, but not from macro button-why? BobW Microsoft Word Help 7 May 10th 06 11:33 PM
Macro question TBoe Microsoft Word Help 4 April 13th 06 07:07 PM
FilePrint macro didn't work after all... janice Microsoft Word Help 11 March 28th 06 06:26 PM


All times are GMT +1. The time now is 04:10 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"