诗词
字典
板报
句子
名言
励志
学校
友答
搜索
首页
中考频道
作文频道
公务员频道
出国留学
医药考试
司法考试
图书频道
外语考试
建筑工程
成人高考
故事频道
教程频道
文档频道
早教
星座频道
校园
求职招聘
考研频道
职业资格
自考频道
计算机考试
财会考试
高考频道
当前位置:
首页
>
教程频道
>
其他教程
>
其他相关
>
施用Add-in向选中的Slide插入文字
2012-06-29
使用Add-in向选中的Slide插入文字这是一个在PowerPoint中创建一个Ribbon按钮,当点击这个按钮时会向当前Sli
使用Add-in向选中的Slide插入文字
这是一个在PowerPoint中创建一个Ribbon按钮,当点击这个按钮时会向当前Slide插入一段文字。
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.Office.Tools.Ribbon;using PowerPoint = Microsoft.Office.Interop.PowerPoint;using System.Windows.Forms;using Office = Microsoft.Office.Core;namespace PowerPointAddIn2{ public partial class Ribbon1 { private void Ribbon1_Load(object sender, RibbonUIEventArgs e) { } private void button1_Click(object sender, RibbonControlEventArgs e) { PowerPoint.Application ppApp = Globals.ThisAddIn.Application; PowerPoint.SlideRange ppSR = ppApp.ActiveWindow.Selection .SlideRange; PowerPoint.Shape ppShap = ppSR.Shapes .AddLabel(Office.MsoTextOrientation .msoTextOrientationHorizontal, 0, 0, 200, 25); ppShap.TextEffect.Text = "Hello World!"; } }}