Images resizing when excel range is pasted into PPT using VBA across different Operating system

Joined
May 23, 2017
Messages
1
Hi,

I have automated a process of pasting Excel ranges as images into PPT through VBA. The dimensions like ".width",".height",".left" and ".top" are set after pasting the image.

I was initially working on Windows 7 and had the dimensions according to them. But when I tried to use the same macro in Windows 8, the size of pasted images is stretched too wide. I am confused around why this is happening even when I have defined the dimensions before hand.

Any help is much appreciated.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try unlocking the aspect ratio of the image before setting the size/position after pasting. For one of my programs PPT was stretching the image to max width when pasting it in VBA and this change fixed the problem.
Selection.ShapeRange.LockAspectRatio = msoFalse
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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