Converting images from word document into bitmap object

前端 未结 3 2062
天涯浪人
天涯浪人 2020-12-18 05:57

As per project requirement we need to convert images from word document into bitmap object. To achieve this we tried to convert inlineshape object from Microsoft.Office.Inte

3条回答
  •  南笙
    南笙 (楼主)
    2020-12-18 06:29

    Try this.

    foreach (InlineShape shape in d.InlineShapes)             
    { 
        if (shape != null)
        {
            shape.Range.Select(); 
            d.ActiveWindow.Selection.Copy();
            Bitmap bitmap = new Bitmap(Clipboard.GetImage());
        }
    }
    

提交回复
热议问题