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圆形圆周动画
  • 热门搜索
    茭白怎么做好吃 脸为什么会发红发烫 红烧肉怎么做 李志为什么被全网封 随笔怎么写 烧饼的做法大全 精索静脉曲张怎么办 正方体怎么做 微信聊天记录删除了怎么恢复 岐怎么读