![]() |
#1
|
|||
|
|||
![]()
How to set reference point (0,0) to the top left of a corel document ?
When I create new artistic text and set its left top corner to the left top corner of the document I will not have its (the text) position set to (0,0). What do I need to do , which settings ? I write this post here in this section because I have such a vba code and this does not work as I said I would like Quote:
|
#2
|
||||
|
||||
![]()
Hi.
Hopefully this will help. I added a little to the bottom of your code. I used X5 for this: Code:
Sub moveText2() ActiveDocument.ReferencePoint = cdrTopLeft ActiveDocument.Unit = cdrPixel Dim x#, y#, w#, h# Dim s1 As Shape Set s1 = ActiveLayer.CreateArtisticText(0, 0, "any text") s1.Fill.UniformColor.CMYKAssign 0, 100, 100, 0 s1.text.Story.Paragraphs(1).Font = "Verdana" s1.text.Story.Paragraphs(1).Size = 12 s1.text.Story.Paragraphs(1).Bold = True s1.GetBoundingBox x, y, w, h ActiveDocument.DrawingOriginY = ActivePage.SizeHeight / 2 ActiveDocument.DrawingOriginX = -(ActivePage.SizeWidth / 2) s1.SetPosition 0, 0 End Sub |
#3
|
|||
|
|||
![]()
It works great. Thanks a lot.
Now could you tell me how to change default font size unit from point into pixel in vba ? |
#4
|
|||
|
|||
![]()
Ok, I've found:
Application.ConvertUnits - converts a value between any two units Document.ToUnits - converts any unit into the current document units (as specified by Document.Unit property) Document.FromUnits - converts a value from the current document units into the given unit taken from page: http://forum.oberonplace.com/archive...hp?t-1123.html |
#5
|
||||
|
||||
![]()
Hi.
Yep. You beat me to it. Glad to hear it helped you. -John |
![]() |
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 |
Form position | PAnderson | CorelDRAW/Corel DESIGNER VBA | 3 | 01-02-2011 23:05 |
Position Question | bprice | CorelDRAW/Corel DESIGNER VBA | 1 | 11-10-2008 21:39 |
Text position | CWCN | CorelDRAW/Corel DESIGNER VBA | 2 | 22-09-2008 23:40 |
Pasting in position | longline | Corel Photo-Paint VBA | 2 | 27-05-2008 19:17 |
Getting the mouse position | Rick Randall | CorelDRAW/Corel DESIGNER VBA | 1 | 04-12-2002 10:29 |