![]() |
#1
|
|||
|
|||
![]()
Hello,
I'm looking for a way to change all selected characters to the underscore symbol except for spaces (chr32)). I've drawn a complete blank on this. Here is my closest try. It doesn't work, I think because I can't maintain the shaperange: Code:
sub changeselected() Dim s as shape Dim t1 As TextRange Dim i As Integer, c As Integer Set s = ActiveShape c = s.text.Selection.Characters.Count i = 1 While i < c Set t1 = s.text.Selection.Characters(i) If t1 <> Chr(32) Then s.text.replace t1, "_", True, ReplaceAll:=False End If i = i + 1 Wend I'm probably approaching this all wrong, hence this post. Can anyone please set me on the right path. Thanks, Chris (Hunt) |
#2
|
||||
|
||||
![]()
Chris I believe you have asked this before and Alex was kind enough to provide a solution. See this post: http://forum.oberonplace.com/showpos...64&postcount=6
Best of luck, -Shelby |
#3
|
|||
|
|||
![]()
Thanks, Shelby, you are correct. I've bookmarked the page now. I did a search and couldn't find anything and then couldn't remember. I have the code working now.
Cheers, Chris |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Striping a word down to the first letter only | knowbodynow | CorelDRAW/Corel DESIGNER VBA | 9 | 19-04-2007 16:14 |
Changing Colour of Characters in Artistic text | knowbodynow | CorelDRAW/Corel DESIGNER VBA | 3 | 06-05-2006 20:43 |
Changing text size in CD12 | knowbodynow | CorelDRAW/Corel DESIGNER VBA | 10 | 07-03-2006 08:13 |
Where is the selected text? | petig | CorelDRAW/Corel DESIGNER VBA | 7 | 16-05-2005 16:30 |
Reading Font Properties from selected text in CD9 | sherman01 | CorelDRAW/Corel DESIGNER VBA | 2 | 24-11-2004 08:59 |