So I have figured out how to replace pictures with text in word using this link
But now I need to export pictures from word to a folder. And I’m guessing whenever I find a picture which is a object(type s=Microsoft.Office.Interop.Word.WdInlineShapeType.wdInlineShapePicture) I should do something with it… But I can’t find the option: s.saveAsPicture(@”C:\pic.jpg”);
Your question might be a possible duplicate of: extract image from word file
However, based on my previous answer to your question regarding how to programmatically compare an external image with inline shapes in Word ( see Compare picture in Word file and in a folder? ) – you can make a couple of simple adjustments and use almost the exact same sample code to export each inline shape to a folder instead of comparing the shapes with another image.
To illustrate I have made the necessary adjustments for you and provided the source code below. Again, the application is a C# console application based on .NET 4.5, Microsoft Office Object Library version 15.0, and Microsoft Word Object Library version 15.0.
And like before, I have included references in the source code such that you can see which sources I have based my solution on ( and such that the sources gets the credit they deserve 😉 )