View Single Post
  #6   Report Post  
Posted to microsoft.public.word.tables
DeanH DeanH is offline
external usenet poster
 
Posts: 1,862
Default Resizing imported PowerPoint slides

Many thanks for this.
As I don't often use floating shapes, I don't foresee any problems.
I shall have a play later.
Thanks again.
DeanH

"Jean-Guy Marcil" wrote:

"DeanH" wrote:

This is a nippy bit of maco.
One question, how would it look if it changed the size of multiple images
not in a table?
Many thanks


Something like this (untested).
But this only works on inlinehapes. You would need another routine if you
also have floating shapes. Of course, if you only have floating shapes, you
would need different code.


Sub ResizePowerPoint()

Dim inshpPower As InlineShape
Dim sngOldHeight As Single
Const sngNewHeight As Single = 2.5

With ActiveDocument
If .InlineShapes.Count 0 Then
For Each inshpPower In .InlineShapes
With inshpPower
sngOldHeight = .Height
.Height = InchesToPoints(sngNewHeight)
.Width = InchesToPoints(((.Width * sngNewHeight) /
sngOldHeight))
End With
Next
Else
MsgBox "There are no shapes in this document.", _
vbExclamation, "Cancelled"
End If
End With

End Sub