怎么用VBA读取Powerpoint备注页的文字啊

niuniutop 2007-03-22 02:54:37
当一个PPT切换到备注页视图的时候,是可以在下面加上自己的想法的备注的。
现在我想写一个程序,用VBA把这些备注读出来,
那位大哥能指点一下啊
...全文
910 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Huy 2007-03-23
  • 打赏
  • 举报
回复
借个地。

有没有人在做PowerPoint 2007的开发,有的交流一下。

1.怎么将艺术字取出来,效果不变,画成图片。当然还要保留动画。

2.Smartart怎么取里面的单独一个元素(图形)?
niuniutop 2007-03-22
  • 打赏
  • 举报
回复
using System;
using System.Collections.Generic;
using System.Text;
//add by my shelf
using PowerPoint=Microsoft.Office.Interop.PowerPoint;
using Microsoft.Office.Core;
using System.Windows.Forms;


namespace Test
{
class Program
{
static void Main(string[] args)
{
string filename=@"d:\a.ppt";
PowerPoint.Application ap = new PowerPoint.Application();
ap.Visible = MsoTriState.msoTrue;
PowerPoint.Presentation ps = ap.Presentations.Open(filename, MsoTriState.msoTrue, MsoTriState.msoTrue, MsoTriState.msoTrue);

PowerPoint.DocumentWindow dw = (PowerPoint.DocumentWindow)ap.Windows._Index(1);
dw.ViewType = PowerPoint.PpViewType.ppViewNotesPage;

int n = 0;
foreach (PowerPoint.Slide slide in ps.Slides)
{
foreach (PowerPoint.Shape shape in slide.NotesPage.Shapes)
{

if (shape.TextFrame.HasText.Equals(MsoTriState.msoTrue))
{
MessageBox.Show(shape.TextFrame.TextRange.Text);
}
//MessageBox.Show("has text");


}
}

}
}
}
yangzesen 2007-03-22
  • 打赏
  • 举报
回复
我也想知道,顶

5,139

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 Office开发/ VBA
社区管理员
  • Office开发/ VBA社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧