Attribute ‘Adjust List Indent’ lost when using AXWReports's savetofile
Posted: Thu Apr 15, 2021 9:37 am
hi,
I used AXWReports to create a report using predefined Input_File.docx file as template.In this template, I click the right mouse button on the number ‘1.1’, select the ‘Adjust List Indent...’ command, and modify the ‘Follow number with’ attribute to be ‘Nothing’. But when I use'FDOCX.SaveToFile('Output_File.docx');' to save as a file, the attributes of ‘Follow number with’ with numbers ‘1.1’ and ‘1.2’ have become the default ‘Tab Character’. I don’t know if other settings are needed. How can I solve this problem?
Thank you very much
Before
After
I used AXWReports to create a report using predefined Input_File.docx file as template.In this template, I click the right mouse button on the number ‘1.1’, select the ‘Adjust List Indent...’ command, and modify the ‘Follow number with’ attribute to be ‘Nothing’. But when I use'FDOCX.SaveToFile('Output_File.docx');' to save as a file, the attributes of ‘Follow number with’ with numbers ‘1.1’ and ‘1.2’ have become the default ‘Tab Character’. I don’t know if other settings are needed. How can I solve this problem?
Thank you very much
Code: Select all
var
Para: TAXWLogPara;
begin
FDOCX.LoadFromFile('Input_File.docx');
FDOCX.Editor.TempPAPX.Clear;
// '2' is ID of Style, the name of Style is 'Heading 2'
FDOCX.Editor.TempPAPX.Style := FDOCX.Editor.Styles.Paras['2'];
Para := FDOCX.Editor.Paras.AppendPara;
Para.PlainText := 'Heading 2';
FDOCX.SaveToFile('Output_File.docx');
end;
After