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 16-05-2006, 09:07
keytecstaff
Guest
 
Posts: n/a
Question Find all text and apply text style

Hi,

Is there any Visual Basic code so I can select all the text in CorelDRAW 12 and apply the Default Artistic Text style to it? I then want to select all text and do Revert to Style.



Many thanks,
Reply With Quote
  #2  
Old 16-05-2006, 09:46
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default

Ok, here is how you do it:

Code:
Sub ResetStyles()
    Dim sText As Shape
    For Each sText In ActivePage.SelectableShapes.FindShapes(Type:=cdrTextShape)
        If sText.Text.Type = cdrArtisticText Or sText.Text.Type = cdrArtisticFittedText Then
            sText.ApplyStyle "CorelDefaultID_5006" ' Default Artistic Text style
            sText.CreateSelection
            CorelScript.RevertToStyle
        End If
    Next sText
End Sub
Style support in VBA isn't very good, so all kinds of work arounds must be employed to make it work
Reply With Quote
  #3  
Old 18-05-2006, 09:48
keytecstaff
Guest
 
Posts: n/a
Default

Thanks Alex

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
Striping a word down to the first letter only knowbodynow CorelDRAW/Corel DESIGNER VBA 9 19-04-2007 15:14
Select specified text, change font size? fiddler2b CorelDRAW/Corel DESIGNER VBA 3 23-04-2006 08:11
format text dialog box implement graphicdesigner CorelDRAW/Corel DESIGNER VBA 5 22-12-2004 13:37
Paragraph text like Ingredient List d-signer CorelDRAW/Corel DESIGNER VBA 2 22-01-2004 21:59


All times are GMT -5. The time now is 14:16.


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