I have these lines of code:
I don’t really have an expected HTML output here, but I would like to be able to handle the name of each of the images in order to not have them saved as different images everytime the word document gets read with the same image. Thank you.
Document doc = new Document(MyDir + "in.docx");
// Create and pass the object which implements the handler methods.
HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.Html);
options.ImageSavingCallback = new HandleImageSaving();
doc.Save(MyDir + "Out.html", options);
public class HandleImageSaving : IImageSavingCallback
void IImageSavingCallback.ImageSaving(ImageSavingArgs e)
e.ImageFileName = "new image name";