TMSFNCWXDoc Why does this not work?

This creates an error:

  TMSFNCWXDocx1.Name := 'calibri';
  section := TMSFNCWXDocx1.Document.AddSection; <--- here

This works:

  section := TMSFNCWXDocx1.Document.AddSection;


You're setting the name of the component, which will reinitialize the browser.

However the font property is not supported at this moment. This is a standard VCL property which we cannot hide. To set the font you'll need to set it at TTMSFNCWXDocxText level.

Ups. I see. My fault. I wanted to set a default font for the entire doc. Can this be achieved somehow?


We've added a DefaultFont & UseDefaultFont property on TTMSFNCWXDocxDocument level to enable you to set one font for everything. You should not use the Font property from VCL.

This improvement is included in the latest update coming this week.

With kind regards,

Should be an easy one, however I do not see, how I can get this to work:

  parfont := TTMSFNCGraphicsFont.Create;
  parfont.Size := 10;
  parfont.Name := 'calibri';
  docRezept.document.DefaultFont := parfont;
  docRezept.document.UseDefaultFont := true;
Uncaught TypeError: this.FDefaultFont is null
    SetDefaultFont http://localhost:8000/WebRezept/WebRezept_1_0_159.js:1
    CreateWordDoc http://localhost:8000/WebRezept/WebRezept_1_0_159.js:1
    btnWordClick http://localhost:8000/WebRezept/WebRezept_1_0_159.js:1
    i http://localhost:8000/WebRezept/WebRezept_1_0_159.js:1
    Click http://localhost:8000/WebRezept/WebRezept_1_0_159.js:1
    Click http://localhost:8000/WebRezept/WebRezept_1_0_159.js:1
    HandleDoClick http://localhost:8000/WebRezept/WebRezept_1_0_159.js:1
    i http://localhost:8000/WebRezept/WebRezept_1_0_159.js:1

We investigated and saw an issue with this.
We will fix this.