0

I'm trying to Compress a Picture in word using its automation libraries. can't figure out how to do that.

static void Main(string[] args)
    {
        Application app = new Application();
        Document doc = app.Documents.Open(DOC_FILE_PATH);

        foreach(InlineShape ilPicture in doc.InlineShapes)
        {
            //ilPicture.{compress the picture}
        }
    }

By default, MSWord does in fact compress the images on a document.Save() but it compresses it to 220ppi while I want it to compress them to 150ppi or 96ppi.

Doing it manually is easily achievable.

Stavm
  • 7,833
  • 5
  • 44
  • 68

1 Answers1

0

It sounds like you may already know how to compress an image. If you're just looking for a way to get the image from a document, see this question/answer.

It is unfortunate that Word does not expose that particular application option.

Community
  • 1
  • 1
Chris
  • 3,400
  • 1
  • 27
  • 41