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 06-05-2004, 08:42
Bellekom
Guest
 
Posts: n/a
Default Panic !!!!!! Paragraph text, frame height

I've made a batch over 5500 illustrations.

And they gave me the wrong font. Now alle my textframes are too small (so you can't see the text anymore).
I've made a little program to make the textframe bigger, the only problem is ..... some of my text is moving. Is ther anybody who has the same problem or now the salution to my problem ?

Sub TextFrame_groter()
Dim s As Shape
If ActiveSelection.Shapes.Count > 0 Then
For Each s In ActiveSelection.Shapes
If s.Type <> cdrTextShape Then
s.RemoveFromSelection
End If
Next s
Else
For Each s In ActivePage.FindShapes(, cdrTextShape)
s.AddToSelection
Next s
End If

For Each s In ActiveSelection.Shapes 'ActiveSelection.Shapes ' *********===== *****
On Error Resume Next
s.SizeHeight = 1.1 * s.SizeHeight
s.Sizeweight = 1.1 * s.Sizeweight

Next s
End Sub

I'know I can also convert to artistic text and back.

Thanks in advance
Reply With Quote
  #2  
Old 06-05-2004, 09:48
lees
Guest
 
Posts: n/a
Default here

s.x=s.x+s.width/2*0.1
s.y=s.y+s.height/2*0.1
Reply With Quote
  #3  
Old 06-05-2004, 10:20
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: Panic !!!!!! Paragraph text, frame height

You can use ActiveDocument.ReferencePoint to set your anchor point. By default, it's upper left corner (I belive), so when you make your object larger it will expand to the right and down. If you want to make sure that the lower left corner doesn't move, then set ReferencePoint to cdrBottomLeft:

Code:
ActiveDocument.ReferencePoint = cdrBottomLeft
...
s.SetSize s.SizeWidth*1.1, s.SizeHeight*1.1
If you meant that your font gets reformatted (reflows), then it's because you make the text box wider too. You might want to change just it's height...

You also could check if there is actual text overflow, by checking Shape.Text.Overflow property and increase the text block height until there is no more overflow...
Reply With Quote
  #4  
Old 06-05-2004, 10:40
Bellekom
Guest
 
Posts: n/a
Default You braught me on an idea.

Thanks Alex,

Your salution didn't work, now all of my text is moving.
But..................

You let me think of something !
s.GetPosition Xas, Yas
s.SizeHeight = 1.1 * s.SizeHeight
s.Sizeweight = 1.1 * s.Sizeweight
s.SetPosition Xas, Yas

It was as simple as that, read the position and set it back.
Thanks for thinking with me. It really helps sometimes.
Reply With Quote
  #5  
Old 11-05-2004, 06:03
d-signer
Guest
 
Posts: n/a
Default

When I tried to use my script in the CorelDRaw 12 I found that method SizeHeight =100 applied to text frame which I just created at the 90 mm weight and 5 mm height works wrong: after that PositionY becomes very strange - my text frame flies away to far distance up. I don't know why. In Corel 11 this script is working properly.
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
Select Paragraph Text with more than one color joexx CorelDRAW/Corel DESIGNER VBA 2 06-10-2004 12:20
Fit Text To Frame Craig Tucker CorelDRAW/Corel DESIGNER VBA 0 14-05-2004 15:52
Paragraph text like Ingredient List d-signer CorelDRAW/Corel DESIGNER VBA 2 22-01-2004 21:59
Resizing a Paragraph text box Steege CorelDRAW CS 1 17-01-2004 04:24
Artistic Text or paragraph invisible after upgrade to v11 ?? tuxedo21 CorelDRAW/Corel DESIGNER VBA 0 26-08-2003 16:27


All times are GMT -5. The time now is 15:49.


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