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 02-03-2006, 20:28
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 371
Default Straightening Text in CD12

CorelDraw12 has align to baseline and straightentext. How would I write VBA to do this for every piece of artistic text on a page? I tried to record a macro but found that it said the function was not supported. Is it possible with VBA?

Thanks,

Chris (Hunt)
Reply With Quote
  #2  
Old 03-03-2006, 07:25
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

Quote:
Originally Posted by knowbodynow
CorelDraw12 has align to baseline and straightentext. How would I write VBA to do this for every piece of artistic text on a page? I tried to record a macro but found that it said the function was not supported. Is it possible with VBA?
You may use VBA command sendKeys to emulate keystrokes: Alt-T, S - it is text menu->straighten text:
Code:
sendKeys "%ts",true ' wait for command completion
Or you may customize "Straighten" menu item and assign it unique key combination (Ctrl-Alt-Shift-S for example) and call it "directly": sendkeys "^+%s"

Another fast way is to use .VertShift property of activeShape.Story:
Code:
activeShape.Story.vertShift=0

Last edited by wOxxOm; 03-03-2006 at 07:42.
Reply With Quote
  #3  
Old 03-03-2006, 08:41
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 371
Default Thanks - sendkeys did the trick

That's great! I assigned alt-b for baseline and alt-s for straighten text and it worked. Now I just need to find out how to add txg to each piece of text before centring it.

Many thanks,

Chris
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
Text selection and sizing ddonnahoe CorelDRAW/Corel DESIGNER VBA 5 17-05-2005 13:19
Text ENCODE Craig Tucker CorelDRAW/Corel DESIGNER VBA 10 26-01-2005 13:59
format text dialog box implement graphicdesigner CorelDRAW/Corel DESIGNER VBA 5 22-12-2004 13:37
Getting the center X on a text shape Rick Randall CorelDRAW/Corel DESIGNER VBA 4 03-08-2004 18:27
Reset text after text compression. Bellekom CorelDRAW/Corel DESIGNER VBA 2 05-05-2004 06:14


All times are GMT -5. The time now is 23:07.


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