【问题标题】:How to reduce size of image in powerpoint2007 with coordinates using C#?如何使用 C# 使用坐标减小 powerpoint2007 中图像的大小?
【发布时间】:2016-06-07 01:07:03
【问题描述】:
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);   

我正在使用上面的代码行在 ppt 中添加图像,在 Office2010 中没有问题,但如果我在 office2007 中使用此代码,它不起作用,图像没有正确放置。

如果您有更好的办法将图像放入 Powerpoint 2007,请提供帮助

【问题讨论】:

  • 你能详细描述一下什么是不工作的,截图也可能有帮助。

标签: c# vb.net powerpoint office-interop office-2007


【解决方案1】:

我正在查看适用于 PowerPoint 2007 的 MSDN,但看不到有用于执行此操作的互操作选项;只有 Visual Basic 应用程序的代码示例。

问题只是 Office 2010 互操作命名空间创建的幻灯片与 PowerPoint 2007 不兼容。

我不知道这是否真的有用,但这是你可以用 VBA 做到的:

Use VBA to insert a picture into a PowerPoint slide

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-05
    • 1970-01-01
    • 2016-05-12
    • 1970-01-01
    • 1970-01-01
    • 2012-08-09
    相关资源
    最近更新 更多