OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-10-2012, 11:34
default.user default.user is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Default Change color in artistic text

This is my first post here and I want to thank you all so much for the great support. I learned a lot and even if it took hours and some trial and error, I always found right solution for my project.

But now i have a problem, I can not solve by myself and where I hope to get some assistance form those who know Corel VBA better then I do.

I have an artistic text with uniform color which contains something similar to:
set_1
set_2
set_3
set_4
set_5

With this text, I perform the following operations to make replacements:
ActivePage.TextFind "Set_1", False
sText.text.Replace "Set_1", VARIABLE, False
ActivePage.TextFind "Set_2", False
sText.text.Replace "Set_2", VARIABLE, False
and so on, which worked well the last years.

Now the requirement changed and VARIABLE contains something like this:
"Text1.1 / Text1.2"
where Text1.2 needs to get a different color. Finally it should look like this:
Text1.1 / Text1.2
Text2.1 / Text2.2
Text3.1 / Text3.2
Text4.1 / Text4.2
Text5.1 / Text5.2

´/´ is always the separator and always the text behind this separator needs to be colored.

Any help, or just ideas would be much appreciated !

Thanks,
Stefan


Englisch is not my native language, but I don't think that there's an other place where I can get help with this issue.

Last edited by shelbym; 10-10-2012 at 14:49.
Reply With Quote
  #2  
Old 10-10-2012, 15:16
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Text Fill

After you do your replace, you could find the character position of the "/" and then fill everything after it. Like this:
Code:
 sText.Text.Story.Range(InStr(sText.Text.Story, "/") - 1, sText.Text.Story.Length).Fill.ApplyUniformFill CreateRGBColor(255, 0, 0)
-Shelby
Reply With Quote
  #3  
Old 13-10-2012, 07:44
default.user default.user is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Default

Looks promising !

I'll give that a try and come back with the result ...


Thanks
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
X5 Artistic Text size change? knowbodynow CorelDRAW/Corel DESIGNER VBA 1 08-02-2012 21:29
Change Text ... then Curve/Line segments to same color dungbtl CorelDRAW/Corel DESIGNER VBA 4 22-02-2008 08:02
Changing color in artistic text zyptse CorelDRAW/Corel DESIGNER VBA 5 08-02-2008 15:04
Change Artistic Text shelbym CorelDRAW/Corel DESIGNER VBA 2 17-08-2007 15:29


All times are GMT -5. The time now is 22:32.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com