I am using macro to paste clipboard text next to my corel document. Technically all works but it is pasted as "paragraph text", but I want the style to be Artistic Text or Document Object will do the thing also.
Is there a way to describe this in macro or is there a setting for that option?
Current code:
Sub Test() ActivePage.Layers("Test").Editable = True Dim pasteopt As StructPasteOptions Set pasteopt = CreateStructPasteOptions With pasteopt.ColorConversionOptions .SourceColorProfileList = "sRGB IEC61966-2.1,Coated FOGRA39 (ISO 12647-2:2004),Dot Gain 15%" .TargetColorProfileList = "sRGB IEC61966-2.1,Coated FOGRA39 (ISO 12647-2:2004),Dot Gain 15%" End With Dim Paste1 As ShapeRange Set Paste1 = ActivePage.Layers("Test").PasteEx(pasteopt) Paste1.LeftX = ActivePage.SizeWidth + 0.5 ActivePage.Layers("Test").Editable = FalseEnd Sub
By default Corel will paste text as "Paragraph" even without macro - Is there a way to change that? Not by changing the default font and then ticking the artistic option - but in general, for all the fonts ?
Try to add one line
Sub Test() ActivePage.Layers("Test").Editable = True Dim pasteopt As StructPasteOptions Set pasteopt = CreateStructPasteOptions With pasteopt.ColorConversionOptions .SourceColorProfileList = "sRGB IEC61966-2.1,Coated FOGRA39 (ISO 12647-2:2004),Dot Gain 15%" .TargetColorProfileList = "sRGB IEC61966-2.1,Coated FOGRA39 (ISO 12647-2:2004),Dot Gain 15%" End With Dim Paste1 As ShapeRange Set Paste1 = ActivePage.Layers("Test").PasteEx(pasteopt) Paste1.LeftX = ActivePage.SizeWidth + 0.5
Paste1(1).Text.ConvertToArtistic
ActivePage.Layers("Test").Editable = False End Sub
Oh thanks, it worked!
You are welcome.