Some PowerPoint VBA Tips
1) To insert slides from another presentation file, use InsertFromFile Method:
Inserts slides from a file into a presentation, at the specified location. Returns an integer that represents the number of slides inserted.
expression.InsertFromFile(FileName, Index, SlideStart, SlideEnd)
expression - Required. An expression that returns a Slides collection.
FileName - Required String. The name of the file that contains the slides you want to insert.
Index - Required Long. The index number of the Slide object in the specified Slides collection you want to insert the new slides after.
SlideStart - Optional Long. The index number of the first Slide object in the Slides collection in the file denoted by FileName.
SlideEnd - Optional Long. The index number of the last Slide object in the Slides collection in the file denoted by FileName.
Example
This example inserts slides three through six from C:/Ppt/Sales.ppt after slide two in the active presentation.
ActivePresentation.Slides.InsertFromFile _
    "c:/ppt/sales.ppt", 2, 3, 6
 
2) To get snapshot of a slide, use ActivePresentation.SaveAs FileName:="c:/filename.png", FileFormat:=ppSaveAsPNG, EmbedTrueTypeFonts:=msoFalse
 
3) Some other useful VBA code snippets on web:
 
阅读更多
想对作者说点什么? 我来说一句

PowerPoint VBA编程手册

2008年05月06日 931KB 下载

没有更多推荐了,返回首页

不良信息举报

Some PowerPoint VBA Tips

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭