![]() |
#1
|
|||
|
|||
![]()
to insert a character isn't difficult (Ctrl+F11....). But I have diffucults to record a macro, who can give back the character alfa i.e.
Who knows the solution? beny04 |
#2
|
|||
|
|||
![]()
It should be CorelDRAW 11. Don't record a lot of... Try 12, in that the VBA works better.
|
#3
|
|||
|
|||
![]()
To insert any character from VBA may use the Chr(x) vb function. It use the charactercode from actual codepage (x = 32 to 255). There is another function, ChrW(x), where x is the unicode index of the character, but it looks don't work in CDr11. But, maybe, I made some mistake...
Sample to insert character: Code:
ActiveShape.Text.Selection.InsertAfter Chr(245) ' 245 otilde on 1252 codepage and in unicode ' ohungarumlaut on 1250 codepage |
#4
|
|||
|
|||
![]()
Hey beny04! It maybe helps more like me: Text ENCODE
|
#5
|
|||
|
|||
![]()
Hello,
thanks for your answers! The first steps are successfull! Sub alfa() ActiveShape.Text.Selection.InsertAfter Chr(97), Font:="Symbol" End Sub Now I try to program the Font size, and the superscript or the subscript mode. Where I can find a introduction to make VBA-code in coreldraw? Thanks and kind regard! beny04 |
#6
|
||||
|
||||
![]()
CorelDraw 12 comes with a VBA programing guide. By default the user guides are not installed so you will need to install them. The file is called: dvba_pg.pdf also there is a PDF for the CorelDraw 12 Object Model called: VBA Object Model.pdf
Hope it Helps. Shelby |
#7
|
||||
|
||||
![]()
The following example creates a text object with a subscript character.
Code:
Sub Test() Dim s As Shape Set s = ActiveLayer.CreateArtisticText(4, 5, "H2O") s.Text.FontPropertiesInRange(2, 1).Position = cdrSubscriptFontPosition End Sub Shelby |
#8
|
||||
|
||||
![]() Quote:
![]() Code:
Sub Test() Dim s As Shape Set s = ActiveLayer.CreateArtisticText(4, 5, "H2O") s.Text.Story.Characters(2).Position = cdrSubscriptFontPosition End Sub |
#9
|
|||
|
|||
![]()
Your answers was very helpfull for me! Oberonplace seems to be the best forum for Coreldraw-Questions!
beny04 |
![]() |
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 |
delete vba project from cdr file | hotairballoon | CorelDRAW/Corel DESIGNER VBA | 1 | 18-05-2005 09:08 |
CD 10, VBA not returning true outline width | Webster | CorelDRAW/Corel DESIGNER VBA | 1 | 24-11-2004 17:09 |
how to insert a character CHR(216)? | ama | CorelDRAW/Corel DESIGNER VBA | 2 | 17-03-2004 07:55 |
VBA does not work with my CD 10 ! | jobar | CorelDRAW/Corel DESIGNER VBA | 1 | 24-08-2003 12:38 |
Detect if VBA is installed (an answer and a question) | reanan | CorelDRAW/Corel DESIGNER VBA | 3 | 04-12-2002 14:35 |