Attribute ‘Adjust List Indent’ lost when using AXWReports's savetofile

Questions and answers on how to use DOCXReadWrite
Post Reply
nalanfeng
Posts: 16
Joined: Fri Dec 25, 2020 12:49 pm

Attribute ‘Adjust List Indent’ lost when using AXWReports's savetofile

Post by nalanfeng »

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

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; 
Before
Image

After
Image
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Attribute ‘Adjust List Indent’ lost when using AXWReports's savetofile

Post by larsa »

Hello

Will fix this in the next update, ready next week.
Lars Arvidsson, Axolot Data
nalanfeng
Posts: 16
Joined: Fri Dec 25, 2020 12:49 pm

Re: Attribute ‘Adjust List Indent’ lost when using AXWReports's savetofile

Post by nalanfeng »

larsa wrote: Sat Apr 17, 2021 10:41 am Hello

Will fix this in the next update, ready next week.
thank you for your reply.
Post Reply