var
i:Integer;
Temp:String;
begin
F:TForm;
with TDOCXReadWrite.Create(nil) do
try
LoadFromFile(Path);
F:=TForm.Create(nil);
try
with TAXWPreviewVcl.Create(nil) do
try
Parent:=F;
Document:=Editor;
Paint;
Editor.Pages.Delete(0);
ShowMessage(IntToStr(Editor.Pages.Count));
SaveToFile(Path);
finally
Free;
end;
finally
FreeANdNil(F);
end;
finally
Free;
end;
end;
When ShowMessage is executed, the page count showed is ok... The Editor.Pages.Delete(0) worked ok however when the document is saved the first page isn't delete.