prabhuthen
New Member
- Joined
- May 22, 2018
- Messages
- 1
I have a macro to resize and position the image in the powerpoint slide. This macro resize the image across the slide the same.
Now I have to resize the image differently by each slide. Can you please someone help me how I can do that.
[TABLE="width: 289"]
<colgroup><col></colgroup><tbody>[TR]
[TD]Sub Pix_Resize()[/TD]
[/TR]
[TR]
[TD]Dim picturex As Shape[/TD]
[/TR]
[TR]
[TD]Dim S As Slide[/TD]
[/TR]
[TR]
[TD]For Each S In ActivePresentation.Slides[/TD]
[/TR]
[TR]
[TD]For Each picturex In S.Shapes[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]'If pasted as excel linked object[/TD]
[/TR]
[TR]
[TD]If picturex.Type = msoLinkedOLEObject Then[/TD]
[/TR]
[TR]
[TD]With picturex[/TD]
[/TR]
[TR]
[TD].Left = inch_to_Points(0.2)[/TD]
[/TR]
[TR]
[TD].Top = inch_to_Points(0.76)[/TD]
[/TR]
[TR]
[TD].LockAspectRatio = False[/TD]
[/TR]
[TR]
[TD].Width = inch_to_Points(9.55)[/TD]
[/TR]
[TR]
[TD].Height = inch_to_Points(2.75)[/TD]
[/TR]
[TR]
[TD].Line.ForeColor.RGB = vbBlack[/TD]
[/TR]
[TR]
[TD].Line.Weight = 2[/TD]
[/TR]
[TR]
[TD]End With[/TD]
[/TR]
[TR]
[TD]End If[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Next picturex[/TD]
[/TR]
[TR]
[TD]Next S[/TD]
[/TR]
[TR]
[TD]End Sub[/TD]
[/TR]
</tbody>[/TABLE]
--RP
Now I have to resize the image differently by each slide. Can you please someone help me how I can do that.
[TABLE="width: 289"]
<colgroup><col></colgroup><tbody>[TR]
[TD]Sub Pix_Resize()[/TD]
[/TR]
[TR]
[TD]Dim picturex As Shape[/TD]
[/TR]
[TR]
[TD]Dim S As Slide[/TD]
[/TR]
[TR]
[TD]For Each S In ActivePresentation.Slides[/TD]
[/TR]
[TR]
[TD]For Each picturex In S.Shapes[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]'If pasted as excel linked object[/TD]
[/TR]
[TR]
[TD]If picturex.Type = msoLinkedOLEObject Then[/TD]
[/TR]
[TR]
[TD]With picturex[/TD]
[/TR]
[TR]
[TD].Left = inch_to_Points(0.2)[/TD]
[/TR]
[TR]
[TD].Top = inch_to_Points(0.76)[/TD]
[/TR]
[TR]
[TD].LockAspectRatio = False[/TD]
[/TR]
[TR]
[TD].Width = inch_to_Points(9.55)[/TD]
[/TR]
[TR]
[TD].Height = inch_to_Points(2.75)[/TD]
[/TR]
[TR]
[TD].Line.ForeColor.RGB = vbBlack[/TD]
[/TR]
[TR]
[TD].Line.Weight = 2[/TD]
[/TR]
[TR]
[TD]End With[/TD]
[/TR]
[TR]
[TD]End If[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]Next picturex[/TD]
[/TR]
[TR]
[TD]Next S[/TD]
[/TR]
[TR]
[TD]End Sub[/TD]
[/TR]
</tbody>[/TABLE]
--RP