全局代码
Public Sub CreateTextInCorelDRAW(text As String, fontName As String, fontSize As Single)
Dim pia_type As Type = Type.GetTypeFromProgID("CorelDRAW.Application.17")
Dim app As object = Activator.CreateInstance(pia_type)
app.Visible = True
Dim doc As object = app.ActiveDocument
If doc Is Nothing Then doc = app.CreateDocument()
Dim shape As object = doc.ActiveLayer.CreateArtisticText( _
0.0, 0.0, text, Corel.Interop.VGCore.cdrTextLanguage.cdrLanguageMixed, _
Corel.Interop.VGCore.cdrTextCharSet.cdrCharSetMixed, fontName, fontSize, _
Corel.Interop.VGCore.cdrTriState.cdrUndefined, Corel.Interop.VGCore.cdrTriState.cdrUndefined, _
Corel.Interop.VGCore.cdrFontLine.cdrMixedFontLine, Corel.Interop.VGCore.cdrAlignment.cdrLeftAlignment)
End Sub