:C#如何实现把word文档内的图片提取出来

int i = 0;
foreach (Word.InlineShape ish in doc.InlineShapes)
{
     if (ish.Type == Word.WdInlineShapeType.wdInlineShapePicture)
     {
          ish.Select();
          newApp.Selection.Copy();
          Image image = Clipboard.GetImage();

          Bitmap bitmap = new Bitmap(image);
          bitmap.Save("c:\\pic" + i.ToString() + ".jpg");
          i++;
     }
}

你可能感兴趣的:(word)