AddOleObject

ShapeCollection.AddOleObject method

public OleObject AddOleObject(int upperLeftRow, int top, int upperLeftColumn, int left, int height, 
    int width, byte[] imageData)
范围类型描述
upperLeftRowInt32
topInt32
upperLeftColumnInt32
leftInt32
heightInt32
widthInt32
imageDataByte[]

例子


[C#]
using (FileStream fs = new FileStream("image.jpg", FileMode.Open))
{
    int len = (int)fs.Length;
    byte[] imageData = new byte[len];
    fs.Read(imageData, 0, len);
    OleObject oleObject = shapes.AddOleObject(4, 0, 5, 0, 300, 500, imageData);
}

也可以看看