You can the event BeforeSaveTextObjectand set the TextObject:=nil to not save some of the objects depending on certain contions.
procedure TForm1.DoBeforeSaveTextObject ( Writer : TWPCustomTextWriter;
var TextObject : TWPTextObj) ;
begin
if TextObject .IsImage then TextObject := nil;
end;
I see that RTFDataCollection.WriteObjectMode and wobDontSaveImages is only considered for RTF files in WPIOWriteRTF.pas and have no effect for any other format, am I correct?
I don't want images (TWPTextObj with wpobjImage as TWPTextObjType) to be saved when using SaveToStream. I'm using WPTOOLS format and have tried setting WP.WriteObjectMode to wobDontSaveImages , wobRTFNoBinary and wobStandardNoBinary . But images are still being saved.