Saving a words document as HTML (with embedded base64 images) in a memory stream

What I would really like to do is to take a HTML page (that has images) do a search for the word ‘Red’ and for each occurance change it to be ‘Blue’ then save the document into a memory stream.

so far I have opened the document as a Aspose.Words doc, changed all the text I want to change and then when I have gone to save it I get: “Image file cannot be written to disk. When saving the document to a stream either ImagesFolder should be specified or custom streams should be provided via ImageSavingCallback. Please see documentation for details.” Most of the help I have found revolves around using the Email.HtmlSaveOptions and set an imageSavingCallback, however I cannot make this work. Any ideas?

Many thanks

@mickg,

Can you please share source files so that we may further investigate to help you out. Also please share complete sample code that you are using on your end.

I ended up just doing a basic search and replace on the string and that works fine. But thanks for replying :slight_smile:

@mickg,

You are very welcome.