Thanks a lot! I didn't even know the existence of ConvertNumbersToText function. It's really handy.
I was writing my own code as well and approached the inline wrapping a bit differently by iterating through all the shapes and do shape.WrapFormat.Type = wdWrapInline after the pasting. I used your code to process another document and notice that some images are still anchored. I can fix this by using my code on the output doc. Don't really know why. I also tried to put InputDoc.Shapes(i).WrapFormat.Type = wdWrapInline after your InputDoc.Shapes(i).ConvertToInlineShape but that didn't help.
Graphic conversion failed on 1 probably because that 1 shape is a textbox. I was processing another document several hours ago and run into this situation, which is really hard to spot on.
I do notice that your code will put the inlineshape at the beginning of the texts, which in the original file are visually above the image. I'll try to iterate through the paragraphs after the pasting and move that image to be after the texts. Anyway, it's really close to what I want to do and I will keep working on this and ask later.
|