C# 操作PPT图形

 时间:2024-11-01 01:11:04

1、下载并安装Spire.Presentation for .NET, 并将Spire.Presentation.dll文件引用到项目中。

2、将代码放入Visual Studio中:旋转图形【C#】using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Spire.Presentation;namespace Rotate_Shapes{ class Program { static void Main(string[] args) { //创建一个PowerPoint文档并加载示例文档 Presentation ppt = new Presentation(); ppt.LoadFromFile("Sample.pptx"); //获取第一个幻灯片里的第一个图形 IShape shape = ppt.Slides[0].Shapes[0]; //旋转180度 shape.Rotation = 180; //保存文档 ppt.SaveToFile("Rotate.pptx", FileFormat.Pptx2010); } }}

3、前后效果对不图如下:

C# 操作PPT图形
  • PPT彩球魔幻旋转效果制作
  • 如何设置PPT只能看不能修改
  • PPT 2013如何设置多个对象同时运动效果
  • 如何设置PPT圆形圆周动画
  • 热门搜索
    峨眉山旅游攻略 天目湖旅游攻略 沙巴旅游攻略 台湾旅游 哈尔滨旅游 甘南旅游 大学生旅游 旅游景点推荐 俄罗斯旅游 西安旅游必去景点推荐