![]() |
#5
|
|||
|
|||
![]()
I am very grateful for your reply, Paul. I am sorry that I failed to describe in detail the question or problem. I was trying to insert commas inside numerical figures and trying to code like if the numerical text lies within field {(eq /f(2150,2204)} then ignore the comma.
Again, I want to thank you for your effort. Your code flags every character as True whether it is inside the field or not. However, I found a way to get my work done but it may be lengthy and error prone. Code:
If .Range.Characters(1).Previous.Text = "." Or .Range.Characters(1).Previous.Text = "," Or .Range.Characters(1).Previous.Previous.Text = "‚" Then rng.Fields.ToggleShowCodes Selection.MoveRight wdWord, 1, wdExtend If Selection.Range.Fields.Count = 1 Then ' I used this approach, it is manual but get the jobs done rng.Fields.ToggleShowCodes rng.Select GoTo exx Else rng.HighlightColorIndex = wdRed Selection.MoveRight wdCharacter, 1 End If |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Activate (show) a Drop-down form field when another drop-down form field is selected from | Jentis | Word VBA | 1 | 04-19-2018 09:42 PM |
Need a VBA func. that tells if a point lies above/below 3D polygon surface | gonurvia | Excel Programming | 0 | 03-29-2017 01:40 AM |
![]() |
NumberCruncher | Word VBA | 8 | 01-20-2014 11:36 PM |
Insert an image that lies in two rows | raistlin | Word | 1 | 03-10-2013 02:11 PM |
![]() |
mkarthic | Word | 1 | 12-02-2011 02:09 AM |