dreamweaver如何连接ppt

[复制链接]
查看11 | 回复1 | 2011-7-16 06:53:59 | 显示全部楼层 |阅读模式
回复

使用道具 举报

千问 | 2011-7-16 06:53:59 | 显示全部楼层
dreamweaver里可以通过插入ActiveX的办法来控制PPT,比较完善的办法是脚本建立对PowerPoint对象的实例,再进行控制.

例如,以下的脚本是用VBS编写的,实现了打开PowerPoint并简单编辑:

SetobjPPT=CreateObject(\"PowerPoint.Application\")
objPPT.Visible=True
SetobjPresentation=objPPT.Presentations.Add
objPresentation.ApplyTemplate(\"C:\\ProgramFiles\\MicrosoftOffice\\Templates\\PresentationDesigns\\Globe.pot\")

strComputer=\".\"
SetobjWMIService=GetObject(\"winmgmts:\\\\\"defds123strComputerdefds123\"\\root\\cimv2\")
SetcolProcesses=objWMIService.ExecQuery(\"Select*FromWin32_Process\")

ForEachobjProcessincolProcesses
SetobjSlide=objPresentation.Slides.Add(1,2)
SetobjShapes=objSlide.Shapes

SetobjTitle=objShapes.Item(\"Rectangle2\")
objTitle.TextFrame.TextRange.Text=objProcess.Name

strText=\"Workingsetsize:\"defds123objProcess.WorkingSetSizedefds123vbCrLf
strText=strTextdefds123\"Priority:\"defds123objProcess.Prioritydefds123vbCrLf
strText=strTextdefds123\"Threadcount:\"defds123objProcess.ThreadCountdefds123vbCrLf

SetobjTitle=objShapes.Item(\"Rectangle3\")
objTitle.TextFrame.TextRange.Text=strText
Next

objPresentation.SaveAs(\"C:\\Scripts\\Process.ppt\")
objPresentation.Close
objPPT.Quit

此外,还有一种办法,就是引用第三方控件,专门用来控制Office套件的东东,比如:iWebOffice等,你可以搜下.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行