Posted: Tue Dec 04, 2007 9:57 pm Post subject: Calculate a picture's scale height and width
I need to know how or what formulaWord uses to calculate a picture's scale
height and width when it is pasted from Excel into Word.
I have several Excel ranges/tables that vary in column/row numbers and a
rogram that copies the ranges in Excel and pastes them as metafile pictures
in Word. Before the image is pasted into Word I would like to give users a
visual indication of how much of the image will not fit in Word so they can
resize it until it fits w/o having to do it via trial and error.
Posted: Wed Dec 05, 2007 9:21 am Post subject: Re: Calculate a picture's scale height and width
Hi Richard
You can't do what you have in mind. What you can do is to paste the
picture and then get a reference to the picture. With the reference to
the picture, you can then find out how big it is and offer the user some
options. In cases like this I generally get the size of the image and if
it is wider than the margins (= PageWidth - LeftMargin - RightMargin),
then offer to re-size the image (ie change the ScaleWidth) to match the
margin width.
"Richard LT" <richard.tejada@cushwake.com> wrote in message
news:%2350w9wsNIHA.4712@TK2MSFTNGP04.phx.gbl...
Quote:
I need to know how or what formulaWord uses to calculate a picture's
scale height and width when it is pasted from Excel into Word.
I have several Excel ranges/tables that vary in column/row numbers and
a rogram that copies the ranges in Excel and pastes them as metafile
pictures in Word. Before the image is pasted into Word I would like to
give users a visual indication of how much of the image will not fit
in Word so they can resize it until it fits w/o having to do it via
trial and error.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum