Importing Text From Database

I have a sql database table that stores formatted html strings and when I bring that string into CorelDraw, it ignores all the html tags. Does CorelDraw allow you to set the text of a shape object and keep the formatting? Does CorelDraw have it's own proprietary formatting style? Can we access that "raw" text and write to it?

I'm using vb.net to get the shape object and assign the value to it's Story.Text property.

Dim prodDescriptionShape As Shape = foregroundLayer.FindShape("ProdDescription")
prodDescriptionShape.Text.MakeHTMLCompatible(True)
prodDescriptionShape.Text.Story.Text = <html><b>Hello</b> there! H<sub>2</sub>O</html>

Outputs:
Hello there! H2O

Wanted:
Hello there! H2O

Any help would be appreciated.

Parents
  • Write your html to a file and then import it. This will do the formatting you are wanting:

    Sub ImportHTML()
        Dim impflt As ImportFilter
        Dim s As Shape
        
        Set impflt = ActiveLayer.ImportEx("C:\Temp\Temp_HTML.htm", cdrHTML)
        impflt.Finish
        
        Set s = ActiveShape
        s.Text.ConvertToArtistic
    End Sub
    

    -Shelby

Reply Children
No Data