Access to the object shape, but I don't know how to convert images or inlineshape object, although there is a shape. The convertinlineshape () method, direct call complains parameter errors, is really a confused, ask the great spirit action!!!!!
CodePudding user response:
Document doc=Documnet (" image physical full path ");
DocumentBuilder builder=new DocumentBuilder (doc);
Shape Shape=new Shape (doc, ShapeType. Image);
Shape. The ImageData. SetImage (" photo network path ");
Shape. Width=100;
Shape. The height=100;
Shape. WrapType=WrapType. None;
Shape. BehindText=false;
Builder. InsertNode (shape);
Remember "post!
CodePudding user response:
reference 1st floor p1354542848 response: Document doc=Documnet (" physical full path to the image "); DocumentBuilder builder=new DocumentBuilder (doc); Shape Shape=new Shape (doc, ShapeType. Image); Shape. The ImageData. SetImage (" photo network path "); Shape. Width=100; Shape. The height=100; Shape. WrapType=WrapType. None; Shape. BehindText=false; Builder. InsertNode (shape); Remember "post! I didn't know it now is to get the shapes, images of the object, then what are you afraid of this is not the image into shape inserted into a word? CodePudding user response:
You use this method first try in reply, don't you try to know? I have a few days ago just to solve this problem in the actual project