Image Size using InlineShapes.AddPicture

M

MikeUK

the included macro imports and scales a .jpg image and is saved within a
template for multiple users. Unfortunately the scaling is not consistent
across all systems.

When I look at the image properties on some PCs the size is reported as 9.1
x 8.7 cm, whilst other systems report it as 3.6 x 3.45 cm. The larger is
correct at 72dpi.

All are running the same version of Word 2002

Any suggestion show I can ensure consistent size.

Thanks
Mike
Selection.InlineShapes.AddPicture FileName:= _
"wmark - copy.jpg", LinkToFile:=False, SaveWithDocument:=True
With ActiveDocument.InlineShapes(1)
.ScaleHeight = 150
.ScaleWidth = 150
End With

ActiveDocument.InlineShapes(1).ConvertToShape
Set MikesWMark = ActiveDocument.Shapes(1)

With MikesWMark
.RelativeHorizontalPosition = wdRelativeHorizontalPositionMargin
.ZOrder msoSendBehindText
.IncrementLeft 60#
.IncrementTop 40
End With
 
B

Bob Buckland ?:-\)

Hi Mike,

Is the setting in Tools=>Options=>General=>Web Options=>Picture
set at 72 PPI in all of these?

If the graphic does not contain a PPI value?
If not Word will tend to use that
option setting to determine how to size the graphic.
JPGs can embed the Pixel Per Inch (PPI) value
but it's an optional value in the graphic.
Embedding that in the graphic
in your scenario would seem to make sense.)

You might also want to consider creating a copy
of the graphic that is the finished size you want.
Scaling a bitmapped graphic up (including jpg) can
lose crispness as the pixels enlarge/spread apart.

=========
the included macro imports and scales a .jpg image and is saved within a
template for multiple users. Unfortunately the scaling is not consistent
across all systems.

When I look at the image properties on some PCs the size is reported as 9.1
x 8.7 cm, whilst other systems report it as 3.6 x 3.45 cm. The larger is
correct at 72dpi.

All are running the same version of Word 2002

Any suggestion show I can ensure consistent size.

Thanks
Mike
Selection.InlineShapes.AddPicture FileName:= _
"wmark - copy.jpg", LinkToFile:=False, SaveWithDocument:=True
With ActiveDocument.InlineShapes(1)
.ScaleHeight = 150
.ScaleWidth = 150
End With

ActiveDocument.InlineShapes(1).ConvertToShape
Set MikesWMark = ActiveDocument.Shapes(1)

With MikesWMark
.RelativeHorizontalPosition = wdRelativeHorizontalPositionMargin
.ZOrder msoSendBehindText
.IncrementLeft 60#
.IncrementTop 40
End With>>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

Office 2003 Editions explained
http://www.microsoft.com/uk/office/editions.mspx
 
M

MikeUK

Bob,
Thanks, unfortunately the PPI is set to 96 on all systems, and makes no
diference turning down to 72 so I guess the ppi has has been embedded in the
jpg.
Very good point about image size, I will do that.
Thanks again
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top