獲取到shape物件,但是不知道如何轉換成圖片或者inlineshape物件,雖然有shape.convertinlineshape()方法,直接呼叫會報錯引數錯誤,真是一頭霧水,求大神支招!!
uj5u.com熱心網友回復:
Document doc = Documnet("圖片物理完整路徑");DocumentBuilder builder = new DocumentBuilder (doc);
Shape shape = new Shape(doc,ShapeType.Image);
shape.ImageData.SetImage("圖片網路路徑");
shape.width = 100;
shape.height =100;
shape.WrapType = WrapType.None;
shape.BehindText = false;
builder.InsertNode(shape);
記得結帖!
uj5u.com熱心網友回復:
我現在是獲取到了shapes ,并不知道它的圖片物件,然后你這個怕不是把圖片轉成shape插入到word里面?
uj5u.com熱心網友回復:
你先用這個方法試試在回復,你不試試知道呢? 我前幾天在實際專案中才剛解決這個問題轉載請註明出處,本文鏈接:https://www.uj5u.com/net/122644.html
標籤:C#
