Hello!
I think I might have found a bug.
If I add a new paragraph with
DOCX.Editor.AppendPara
and add no text to this paragraph, the program crashes, when it tries to get a preview going.
Saving the document to a file works just fine.
Example:
DOCX:=TDOCXReadWriteVcl.Create(Nil);
DOCX.Editor.Paras.AppendPara;
DOCX.SaveToFile('C:\Users\Praktikant\Desktop\test.docx');
TfrmPreview.Create(Self).Execute(DOCX.Editor);
DOCX.Free;
This code will save the file just fine, but crash, when trying to show a preview it crashes.
Adding
DOCX.Editor.Paras.Last.AppendPlainText('Example');
before the preview fixes the problem.
Is this intentional?
If so, why?
Possible Bug
Re: Possible Bug
Hello
It's intentional. Using AddPara can be more efficient when building documents as the paragraph content don't have to be plain text, it can be tables, tabs, pictures etc.
It's intentional. Using AddPara can be more efficient when building documents as the paragraph content don't have to be plain text, it can be tables, tabs, pictures etc.
Lars Arvidsson, Axolot Data