Re: how to change font color in Macro?



On Aug 7, 4:31 pm, "Ralph" <nt_consultin...@xxxxxxxxx> wrote:
"Meera" <mnair.leks...@xxxxxxxxx> wrote in message

news:1186483138.620668.109160@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





How to write a macro for the following purpose.
1.Search the lines start with "//*"in CSharp file .
2.Change font color of that lines.
I wrote the following code
Sub ChangeFontColor()

Dim props As EnvDTE.Properties
props = DTE.Properties("FontsAndColors", "TextEditor")
Dim prop As EnvDTE.FontsAndColorsItems =
props.Item("FontsAndColorsItems").Object
prop.Item("Comment").Foreground =
ColorTranslator.ToOle(System.Drawing.Color.HotPink)

End Sub

But all comments are changed to HotPink color.
I need only the comments starting with "//*"
Plz help me dear friends...

Wrong newsgroup and please don't multiple-post.- Hide quoted text -

- Show quoted text -

I use VB MAcro

.



Relevant Pages

  • Re: Print Triangle inside a rectangle
    ... ABCDE EDCBA ... Regularly posted to this newsgroup is a message on how to get the best out of it. ... do you get a compiler error message? ... Plz help. ...
    (comp.lang.java.help)
  • Re: Playing Songs Or Vidoes
    ... all i can here when i turn the volume up is crackling. ... PLZ HELP ... Error message codes may be found searching there or via a general web search. ... Please deliver feedback to the newsgroup, so that others can be helped. ...
    (microsoft.public.windowsmedia.player)
  • Re: Change Color of Desktop Font ?
    ... If you who are an mvp says that one option does not work, ... > kenny wrote: ... >>> font color that way. ... >>> Please reply to the newsgroup ...
    (microsoft.public.windowsxp.customize)
  • Re: Cant click on Header text; It selects colored shape behind it.
    ... change the font color, it selects and moves the colored shape. ... hold down the Shift key and use the Arrow keys to ... This reply is posted in the Newsgroup; please post any follow question or reply ...
    (microsoft.public.word.docmanagement)
  • Re: Pls Need Help with Conditional formatting
    ... Set your font color and bold as wanted. ... Please respond only to this newsgroup. ... I do not reply to personal e-mail ...
    (microsoft.public.access.forms)