How to tell when Word has finished loading an MHT

R

Robert Simpson

I'm automating Word 2007 from C# and programmatically loading an MHT into a
new document.

The problem is that when I go to save it, half the time Word hasn't finished
loading the external image references in the MHT yet so the resulting file
has blank image placeholders.

I would like to wait until Word has finished loading these images before
saving the file, but I don't see anything obvious in Word's object model to
do this.

One nasty approach is to sleep for a couple seconds after loading the MHT,
but then it would mean my program would HAVE to sleep for that amount of
time on every page load and slow the program down -- and even then it
wouldn't guarantee that the images were loaded.

Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top