Free Support Forum - aspose.com

Cannot insert JPEG Image

Run the following code:

Dim mylicense As New License
Dim TN As String = “indoc”
Dim FName As String = “C:\Inbound\markimage.jpg”

mylicense.SetLicense(“Aspose.Words.lic”)
doc = New Document
bldr = New DocumentBuilder(doc)
Dim myshape As Shape = bldr.InsertImage(FName)
doc.Save(“c:\Inbound\a.doc”)
Process.Start(“c:\Inbound\a.doc”)

I put a breakpoint after the InsertImage and could see how the height and width were all screwed up.

Hi Steve,

Thanks for your inquiry. Perhaps, you're using an older version of Aspose.Words; as with Aspose.Words v11.9.0, I was unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v11.9.0 and let us know how it goes on your side. I hope, this will help.

Please note that Aspose.Words mimics the same behavior as MS Word. The image size is greater than normal page size of Doc file. If you insert shared image into Word document by using MS Word, the MS Word insert the image which fits to page size. Please read following documentation links for your kind reference.
http://www.aspose.com/docs/display/wordsnet/InsertImage+Method

I have attached the output Doc file with this post. Please let us know if you have any more queries.

I can confirm that it’s fixed with 11.9. Thanks.

Hi Steve,


Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.