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 09-04-2003, 09:14
Dino
Guest
 
Posts: n/a
Default I can't let the text on a curve line

Hi, Alex!

I use such code:
Code:
Sub CurvePath()
Dim sh As Shape, sPath As Shape
Set sPath = ActiveDocument.ActivePage.FindShape("Curv", cdrCurveShape, 10, True)
Set sh = ActiveLayer.CreateArtisticText(1, 4, "It is the curve text")
sh.Text.FitTextToPath (sPath)
End Sub
VBA gives out the message on a mistake:Object doesn't support this property or method (Error 438)

What I do incorrectly?


By the way, I come Cherkassy, and now I live in Zhitomir
Reply With Quote
  #2  
Old 10-04-2003, 20:33
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: I can't let the text on a curve line

Quote:
Originally Posted by Dino
What I do incorrectly?
That it because you should use FitToPath method instead of FitTextToPath which doesn't exist:

Also be careful when using StaticID parameter in FindShape method. It may be completely different if you recreate your document. You can just omit it and this works well in most cases:

Code:
Sub CurvePath()
    Dim sh As Shape, sPath As Shape
    Set sPath = ActiveDocument.ActivePage.FindShape("Curv", cdrCurveShape, , True)
    Set sh = ActiveLayer.CreateArtisticText(1, 4, "It is the curve text")
    sh.Text.FitToPath sPath
End Sub
You should use it only when you want to locate a shape later (and don't want to (or can't) keep a reference to it in a variable:

Code:
Dim sID as Long
sID = ActiveShape.StaticID
....
Set s = ActivePage.FindShape(StaticID := sID)
Reply With Quote
  #3  
Old 11-04-2003, 05:13
Dino
Guest
 
Posts: n/a
Default

Thank,
It very much has helped to me!
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
Can't resize text geHucKa CorelDRAW/Corel DESIGNER VBA 6 28-02-2005 16:51
counting curve and line segments bbolte CorelDRAW/Corel DESIGNER VBA 1 31-01-2005 18:40
Text ENCODE Craig Tucker CorelDRAW/Corel DESIGNER VBA 10 26-01-2005 14:59
format text dialog box implement graphicdesigner CorelDRAW/Corel DESIGNER VBA 5 22-12-2004 14:37
Reset text after text compression. Bellekom CorelDRAW/Corel DESIGNER VBA 2 05-05-2004 07:14


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


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