Word
A family of Microsoft word processing software products for creating web, email, and print documents.
909 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In Word .Net API, I can restore picturesto its original size with the following code
foreach (Word.InlineShape shape in document.InlineShapes)
{
if (shape.Type == Word.WdInlineShapeType.wdInlineShapePicture)
{
Debug.WriteLine("found a picture");
Office.MsoTriState preLockAspectRatio = shape.LockAspectRatio;
shape.LockAspectRatio = Office.MsoTriState.msoFalse;
shape.ScaleWidth = 100.0F;
shape.ScaleHeight = 100.0F;
shape.LockAspectRatio = preLockAspectRatio;
Debug.WriteLine("restore a picture size");
}
}
But in Word JavaScript API, I couldn't found any API to implement that. It only support to access current size of picture.