image size not change in word

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use INCLUDEPICTURE to embed one image url in word 2000,but when I try to
resize the image , it donot work. any one can help me? below is my code:

Set oRange = oBookmark.Range
Set oSel = objWord.Selection

imgurl2 =
"http://support.microsoft.com/library/images/support/enus/protect_123.gif"
fieldtext = "INCLUDEPICTURE"""+imgurl2+""""
oRange.Select()
oSel.Fields.Add oRange, , fieldtext, False
' set img size
oSel.MoveLeft
oSel.InlineShapes(1).LockAspectRatio = msoTrue
oSel.InlineShapes(1).Height = 105.85
oSel.InlineShapes(1).Width = 281.5
Set nShp = Selection.InlineShapes(1).ConvertToShape
oSel.MoveRight
 
Use the range object that contains the picture rather than the selection
object.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
Back
Top