Need macro to change size, position

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
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Cant say i use powerpoint much. Do slides have names? If so use a Select Case statement on the name is what id suggest.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top