27.02.2015, 18:23
Hallo Kede,
Gruß
Koter
Code:
Dim Pfad As String
Dim Dateiname As String
Dateiname = Trim(TextBox1.text)
Call TextEinfügen(Dateiname)
ActiveDocument.SaveAs(Pfad & Dateiname & ".cpt", cdrCPT).Finish
Sub TextEinfügen(text As String)
Dim Skript As Object
Dim x As Double, y As Double
Set Skript = Application.CorelScript
x = ActiveDocument.SizeWidth / 2
y = 50
With Skript
.TextTool x, y, False, True, 0
.TextSetting "Fill", "255,255,255"
.TextSetting "Font", "Arial"
.TextSetting "TypeSize", "40.000"
.TextSetting "TSWeight", "4096"
.TextSetting "Justify", "2"
.TextAppend text
.TextRender
End With
Set Skript = Nothing
End SubGruß
Koter
![[-]](https://forum.juergens-workshops.de/images/collapse.png)