- Joined
- May 15, 2008
- Messages
- 2
- Reaction score
- 0
I've writen a procedure which enables me to Document Code within a .doc
It scans through all Selected Code, changes it to "Courier New" Font.Size 8, Font.Color Blue, and then all VBA KeyWords DarkRed.
The problem I have is with Comments
I'm using
VBA:
Which finds all comments - no problem.
The error is that any string which contains an ' {Chr(33)}
i.e.
'// Sample Comment String
strString = "The is in 'Quotes' For Your Information"
becomes...
'// Sample Comment String
strString = "The is in 'Quotes' For Your Information"
Colour coding the string wrongly.
Can anybody help me with the Wildcard Expression {COMMENT_TEXT} please.
=DarkSprout=
It scans through all Selected Code, changes it to "Courier New" Font.Size 8, Font.Color Blue, and then all VBA KeyWords DarkRed.
The problem I have is with Comments
I'm using
VBA:
Code:
COMMENT_TEXT = "'[!" & Chr(34) & "]*\" & vbCr
...
Do While .Execute(Findtext:=COMMENT_TEXT, MatchWildcards:=True, Forward:=True, MatchCase:=True) = True
r.Font.Color = conCOMMENT
r.HighlightColorIndex = conCOMBACK
Loop ...
The error is that any string which contains an ' {Chr(33)}
i.e.
'// Sample Comment String
strString = "The is in 'Quotes' For Your Information"
becomes...
'// Sample Comment String
strString = "The is in 'Quotes' For Your Information"
Colour coding the string wrongly.
Can anybody help me with the Wildcard Expression {COMMENT_TEXT} please.
=DarkSprout=