Microsoft has an article that explains how to automate PowerPoint using VB

For some odd reason they've entitled it How to automate Powerpoint using VB

Here's a quick example:

Sub AutomatePowerPoint()
' This requires that you set a reference to PowerPoint in Tools, References
' You could later change these to As Object to avoid that necessity
Dim oPPTApp As PowerPoint.Application
Dim oPPTPres As PowerPoint.Presentation
Dim sPresentationFile as String sPresentationFile = "C:\MyFiles\Somefile.PPT" ' Get a reference to PowerPoint app
Set oPPTApp = New PowerPoint.Application
' set it visible or you may get errors - there are ways around this but they're
' beyond the scope of this FAQ
oPPTApp.Visible = True
' minimize if you want to hide it:
' oPPTApp.WindowState = ppWindowMinimized ' Open our source PPT file, get a reference to it
Set oPPTPres = oPPTApp.Presentations.Open(sPresentationFile) With oPPTPres ' Do stuff ...
' Show the number of slides in the file, for example
msgbox .Slides.Count
End With ' Cleanup
' Close the presentation
oPPTPres.Close
' Quit PPT
oPPTApp.Quit
' Release variables
Set oPPTPres = Nothing
Set oPPTApp = Nothing End Sub url:http://www.pptfaq.com/FAQ00115_How_to_automate_PowerPoint_using_VB.htm

How to automate PowerPoint using VB的更多相关文章

  1. 用PowerPoint中的VB实现课件中的智能交互

    http://www.duxiushan.net/index.asp?xAction=xReadNews&NewsID=294 我们使用PPT的目的只有一个,即更好地达成“沟通.演说.汇报.讲 ...

  2. Display PowerPoint slide show within a VB form or control window

    The example below shows how to use VB form/control as a container application to display a PowerPoin ...

  3. 【jacob word】使用jacob,合并多个word为一个word文件

    将几个word文件合并到一个word文件,使用注意点: 1.后面附项目运用的jar包jacob-1.9, 2.并且jacob运用中,需要将附件内的jacob.dll放到windows/system32 ...

  4. JACOB的语法

    转自:http://www.bitscn.com/pdb/java/200904/161117.html 如果你想写一个JAVA代码,其中需要调用JACOB提供的功能,而你还是新手,也许篇文章会大大降 ...

  5. C#/VB.NET 向PowerPoint文档插入视频

    如今,Microsoft Office PowerPoint在我们日常生活中的应用已经很广泛了,利用Microsoft Office PowerPoint不仅可以创建演示文稿,还可以在互联网上召开面对 ...

  6. SharePoint 2013 中的 PowerPoint Automation Services

    简介                许多大型和小型企业都将其 Microsoft SharePoint Server 库用作 Microsoft PowerPoint 演示文稿的存储库.所有这些企业在 ...

  7. VB execl文件后台代码,基础语法

    Excel宏与VBA 程序设计实验指导1 实验1 Excel宏与VBA 语法基础 一.实验目的 1.熟练掌握录制宏.执行宏.加载宏的方法: 2.熟练使用Excel VBA编辑环境,掌握VBA的编辑工具 ...

  8. [转载]在VB.Net中获取COM对象的特定实例(Getting a specific instance of COM object in VB.Net)

    转载:http://www.it1352.com/534235.html 问题: I am writing a Windows Form application in .Net to list all ...

  9. C#,VB.NET将PPT文档转换为HTML

    PPT文档主要用于展示,有时候我们需要将PPT文档转换为HTML格式方便查看.本文将介绍如何使用C#和VB.NET将PPT文档转换为HTML格式.该方案使用了.NET PowerPoint 组件Spi ...

随机推荐

  1. 1.2Hello, World!的大小

    描述 还记得在上一章里,我们曾经输出过的“Hello, World!”吗? 它虽然不是本章所涉及的基本数据类型的数据,但我们同样可以用sizeof函数获得它所占用的空间大小. 请编程求出它的大小,看看 ...

  2. 'latin-1' codec can't encode characters in position解决字符问题

    当遇到这样的报错时,原因是: pymysql库在处理mysql语句时,默认的编码方式是'latin-1',这种编码方式能识别的字符是有限的 解决办法:找到\site-packages\pymysql\ ...

  3. C语言小项目-基于TCP协议和SOCKET编程的网络通信系统

    1.1 功能结构图   网络通信系统一共由4个模块组成,分别是点对点客户端.点对点服务端.服务器中转服务端.服务器中转客户端.这4个模块是成对使用的,点对点客户端和点对点服务端一起使用,服务器中转服务 ...

  4. N - Binomial Showdown (组合数学)

    Description In how many ways can you choose k elements out of n elements, not taking order into acco ...

  5. ACM_走楼梯Ⅱ

    走楼梯Ⅱ Time Limit: 2000/1000ms (Java/Others) Problem Description: 有一楼梯共N+1级,刚开始时你在第一级,若每次能走M级(1<=M& ...

  6. 百度地图API显示多个标注点带提示的代码 / 单个标注点带提示代码

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  7. 每天学点Linux命令之Linux-Shell中的数据重定向与管道命令

    在Linux shell中, 数据重定向使用 > < 符号,管道命令使用 | 符号链接前后两个命令. 具体区别如下: 数据重定向 1.(>): 左侧应该有标准输出 > 右侧只能 ...

  8. kafka_2.11-0.8.2.2.tgz的3节点集群的下载、安装和配置(图文详解)

    kafka_2.10-0.8.1.1.tgz的1或3节点集群的下载.安装和配置(图文详细教程)绝对干货 一.安装前准备 1.1 示例机器 二. JDK7 安装 1.1 下载地址 下载地址: http: ...

  9. CF822C Hacker, pack your bags!

    思路: 对于一个区间[l, r],只需枚举所有满足r' < l并且二者duration之和为x的区间[l', r'],寻找其中二者cost之和最小的即可.于是可以开一个数组a[],a[i]表示所 ...

  10. Microsoft SQL Server学习(四)--约束

    SQLServer - 约束 主要是为了保证数据库中的数据一致性.有效性.准确性, 从而提高了数据库中数据的正确性 一.约束的分类 在SQLserver中,约束分三种不同类型 1.实体约束 实提约束是 ...