OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 14-03-2016, 07:18
ReSkull's Avatar
ReSkull ReSkull is offline
Junior Member
 
Join Date: Oct 2009
Posts: 2
Exclamation .Applystyle issue in X7

hey there I wrote this macro to replace text properties with another one
but "Applystyle" seems not working...
there no error, it just selects texts and the nothing happens


Sub FindAndReplaceTextProps1()
'For CorelDRAW x7
Dim s As Shape, sr As ShapeRange
Dim p As Page
Dim t As TextRange
Dim i&, j&
Dim strfont$
Dim mycol1 As New Color

'COLOR to SEARCH
mycol1.CMYKAssign 0, 100, 100, 0

'FONT to SEARCH
foundfont = "B Zar"
'FONT to REPLACE
setfont = "B Traffic"
'STYLE to REPLACE
setstyle = "A"


Set sr = ActivePage.Shapes.FindShapes(, cdrTextShape)
For Each s In sr
For i = 1 To s.Text.Story.Words.Count
Set t = s.Text.Story.Words(i)
If t.Fill.UniformColor.IsSame(mycol1) Then
t.ApplyStyle "A"

End If
Next i
Next s
End Sub

thanks for forwards
Reply With Quote
  #2  
Old 04-04-2016, 13:48
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 ApplyStyle TextRange

I can confirm that ApplyStyle does not seem to work with a TextRange, only the entire Shape.

-Shelby
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
Issue with macro. ProofingGuy Macros/Add-ons 2 25-08-2011 16:20
Issue with SelectShapesAtPoint HeauxmBru Macros/Add-ons 3 14-08-2011 12:43
Having a bit of a timing issue gag546112 CorelDRAW/Corel DESIGNER VBA 7 22-08-2010 18:26
PMS color - X5 Issue biok CorelDRAW/Corel DESIGNER VBA 4 29-04-2010 13:52
Eraser issue jahmer General 0 17-01-2008 15:59


All times are GMT -5. The time now is 21:01.


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