04-07-2017 12:08 PM
Hey everyone,
Hopefully just a quick question - is there a functionality to lock aspect ratio when adding an image to word? I've included my current layout. The idea is that it takes an image, adds it to a report, adds a caption, then adds a description underneath. Ideally I'd like to lock the aspect ratio of the picture as well, but I couldn't locate it under any VIs or the ActiveX, so I probably just missed it somewhere.
Thank you,
Anthony
04-07-2017 12:19 PM
The Format Picture VI has a scale factor. Use the desired image width (or height) divided by the actual image width (or height) and that is your scale factor. You can't specify both the width/height and scale factor with this VI. Check the help file.
04-08-2017 01:58 PM
I'd noticed and tested that out, however it appears that scale factor doesn't lock my aspect ratio in the word document. Also, it doesn't provide the consistency for reporting since I'm working with different sized/resolution images. You are correct that it could "lock" my scale factor while exporting the images to word, but once they're in word they're unlocked again.
04-08-2017 05:06 PM
As of Word 2010 you can't restrict a user from resizing the width and/or height of a picture by dragging the side (even if lock aspect ratio is checked). The Lock aspect ratio works only in Word dialog box or if you change one dimension with ActiveX. An non-ideal alternative would be to make the document read only.
If you can't do it within Word, you will not be able to do it with ActiveX. Word is ok for creating and editing a report but not for publishing.
Ben64