How to reduce size of image in powerpoint2007 with coordinates using C#?

74 Views Asked by At
slide.Shapes.AddPicture(pictureFileName, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoTrue, shape.Left, shape.Top, shape.Width, shape.Height).ScaleHeight(and, MsoTriState.msoCTrue, MsoScaleFrom.msoScaleFromMiddle);   

I'm Using above code line to adding images in ppt, there is no issue in Office2010, but if I'm using this code in office2007 it's not working, Images aren't placing correctly.

Please help if you have any better idea to place images into Powerpoint 2007

1

There are 1 best solutions below

0
Russ Clarke On

I'm looking at MSDN for PowerPoint 2007 and I can't see there is an interop option for doing this; there are only code examples for Visual Basic for applications.

The problem is simply that the slide created by the Office 2010 Interop namespace is not compatible with PowerPoint 2007.

I don't know if this is really useful, but this is how you can do it with VBA:

Use VBA to insert a picture into a PowerPoint slide