关闭

Some PowerPoint VBA Tips

386人阅读 评论(0) 收藏 举报
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:
 
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:653次
    • 积分:15
    • 等级:
    • 排名:千里之外
    • 原创:1篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章存档
    阅读排行
    评论排行