Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/05/2005, 08:27
Avatar de Caminante
Caminante
Colaborador
 
Fecha de Ingreso: julio-2002
Ubicación: Xalapa, Veracruz. Mex
Mensajes: 4.420
Antigüedad: 21 años, 8 meses
Puntos: 47
Corel Draw 11 Escribir Vertical por Michael Cervantes

Siguiendo las instrucciones:

Abrimos el notepad de windows.



Abierto asi tal cual lo grabamos solo que modificar para no grabarlo como TXT, seleccionar la opcion en tipo de archivo All files despues NOMBREARCHIVO.GMS.



Buscamos la ruta donde se instalan estas acciones, Draw\Scripts



Posteriormente abrimos Corel y vamos al editor de visual basic



Seleccionamos nuestra rutina.



Abierto el editor seleccionamos nuestro documento, y click boton derecho para adicionar las siguientes lineas.



Las cuales quedaran así



Cita:
Dim s As TextRange
Dim ap As String
Dim c As Long

Sub MCVerti()
ap = Left(AppWindow.Caption, 12)
If ActiveShape.Type = cdrTextShape Then
Set s = ActiveShape.Text.Story.Characters.All
ActiveTool = cdrToolDrawText
c = s.Characters.Count - 1
Do While c <> 0
AppActivate ap, False
SendKeys "{home}", True
SendKeys "{right}", True
SendKeys "{enter}", True
c = c - 1
Loop
s.Alignment = cdrCenterAlignment
s.LineSpacing = 80

End If
Ahora lo anterior hay que ajustarlo para que las ordenes sigan sin ningun problema.



Lo grabamos y regresamos a corel donde tenemos nuestro texto de prueba.



Ejecutamos la macro.



Y automáticamente se activa.



Quedando de la siguiente forma.



Ahora al ejecutarlo me marco algunos errores y al final tenia que agregar una orden como lo marco en la siguiente imagen.



Las alineaciones de las ordenas las hice en el notepad y las pegue al editor de Vidual Basic.

El texto con las adiciones:

Cita:
Dim s As TextRange
Dim ap As String
Dim c As Long

Sub MCVerti()
ap = Left(AppWindow.Caption, 12)

If ActiveShape.Type = cdrTextShape Then
Set s = ActiveShape.Text.Story.Characters.All
ActiveTool = cdrToolDrawText
c = s.Characters.Count - 1

Do While c <> 0
AppActivate ap, False
SendKeys "{home}", True
SendKeys "{right}", True
SendKeys "{enter}", True
c = c - 1

Loop
s.Alignment = cdrCenterAlignment
s.LineSpacing = 80

End If

End Sub