I have worksheet with an embedded Word document. I used the Word document to write summaries with full formatting and spell check.
The issue is that the if the text of the summary has more or less lines than it did before it was edited, the embedded object gets resized internally(that is the "original size" changes to accomdate the change in the text), but height of the the embedded object on the worksheet does not, so the text either gets compressed or stretched vertically to fit within the shape, rather than the shape resizing to fit the text. I have to manually select the embedded shape, right click Format Object, click the Size tab, uncheck Lock aspect ratio and click Reset. It works whether or not Relative to original picture size was checked (and that may be part of the issue).
I have tried to use this...
ActiveSheet.Shapes("Remarks").ScaleHeight 1.0, msoTrue, msoScaleFromTopLeft
However, I get an error stating it only applies to pictures. Of course, if the msoTrue were msoFalse, it changes the height by the factor, which I have no way of knowing after the length of the of the text has changed without using the manual route..
I am trying to get the embedded shape to automatically resize with a macro.
The issue is that the if the text of the summary has more or less lines than it did before it was edited, the embedded object gets resized internally(that is the "original size" changes to accomdate the change in the text), but height of the the embedded object on the worksheet does not, so the text either gets compressed or stretched vertically to fit within the shape, rather than the shape resizing to fit the text. I have to manually select the embedded shape, right click Format Object, click the Size tab, uncheck Lock aspect ratio and click Reset. It works whether or not Relative to original picture size was checked (and that may be part of the issue).
I have tried to use this...
ActiveSheet.Shapes("Remarks").ScaleHeight 1.0, msoTrue, msoScaleFromTopLeft
However, I get an error stating it only applies to pictures. Of course, if the msoTrue were msoFalse, it changes the height by the factor, which I have no way of knowing after the length of the of the text has changed without using the manual route..
I am trying to get the embedded shape to automatically resize with a macro.