我可以用原始文本定义幻灯片或演示文稿吗?
大家好:我想使用原始文本文件创建一个 Power Point 演示文稿,以便我可以快速编辑文件并查看结果,并保证统一的格式。基本上,我正在谈论将数据内容与演示文稿分开。
我该怎么做?我想乳胶也许是一个选择。我还看到有用于 Powerpoint 和开放式办公室演示文稿的 API。
Hi Guys : I wanted to create a power point presentation using a raw text file, so that i can rapidly edit the file and see the results, gauranteed with uniform formatting. Basically, I'm talking about separating the data content from the presentation.
How can I do this ? Im thinking that maybe Latex could be a choice. I've also seen that there are API's for Powerpoint and open office presentations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Powerpoint 通过 COM 公开它的 API - 这使得您可以使用任何支持 COM 的编程语言在 GUI 中执行(几乎)任何操作。困难在于 API 在版本之间发生变化。确定 API 范围的一种方法是使用宏录制工具手动制作一张幻灯片,然后将其翻译为您的目标语言。
我有一些旧的(最近未测试过)Powerpoint 2003 的Python 代码,您可以根据自己的布局需求了解代码的外观。
编辑:
Openoffice(可以导出到 powerpoint)还附带其脚本 API 可用于解决类似问题。
Powerpoint exposes it's API via COM - which makes it possible to do (almost) anything that you can do in the GUI in any programming language that supports COM. The difficulty is that the API changes between releases. One way to scope out the API is to use the macro recording facility to manually do one slide, and then translate that to your target language.
I've got some old (not tested recently) python code for Powerpoint 2003 that should give you an idea of what the code might look like depending on your layout needs.
Edit:
Openoffice (that can export to powerpoint) also ships with it's scripting API that could be used to solve similar problems.
如果您需要的只是带有标题和项目符号文本的幻灯片,那么这很简单。创建一个如下所示的 txt 文件(使用 TAB 键代替下面的键):
依此类推。保存文件,启动 PowerPoint,选择文件打开命令,在文件打开对话框中选择大纲或所有类型的文件,然后选择 TXT 文件。完毕。
If all you need is slides with titles and bulleted text, it's quite simple. Create a txt file that looks like this (use the TAB key in place of below):
And so on. Save the file, start PowerPoint, choose the file open command, choose Outline or files of all types in the file open dialog box and select your TXT file. Done.