![]() |
#1
|
|||
|
|||
![]()
Don't work text position option in VBA code. For example, if I try to execute this code in VBA (CorelDraw X4):
Sub Test() Dim d As Document Dim s As Shape Dim t As Text Set d = CreateDocument Set s = d.ActiveLayer.CreateParagraphText(2, 2, 4, 4, "This is an example.") Set t = s.Text t.Story.Words.First.Position = cdrSuperscriptFontPosition End Sub Run-time error appear, but if I write t.Story.Words.First.Position = cdrSubscriptFontPosition (instead Superscript, like in VBA help) i have no error. |
#2
|
||||
|
||||
![]()
I can confirm this is a bug. You can work around it by using the older FontPropertiesInRange:
Code:
Sub Test() Dim d As Document Dim s As Shape Dim t As Text Dim lngCount As Long Set d = CreateDocument Set s = d.ActiveLayer.CreateParagraphText(2, 2, 4, 4, "This is an example.") Set t = s.Text lngCount = t.Story.Words.First.Characters.Count t.FontPropertiesInRange(1, lngCount).Position = cdrSuperscriptFontPosition End Sub |
#3
|
|||
|
|||
![]()
Shelbym! Thank you very much, it works
![]() But bug is really exist, may be it had been fixed in CorelDraw X5 . |
#5
|
|||
|
|||
![]()
And your work-around still works.
Thanks Shelby, saved my day, one more time ![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Superscript and Subscript | JudyHNM | CorelDRAW/Corel DESIGNER VBA | 1 | 13-11-2007 16:45 |