想用vbs做一个脚本,包括1.新建ppt文件,2.编辑,比较简单的编辑就可以
有没有给点代码的,第一个回答太不靠谱,第二个同上
用vbs 编辑ppt,可以吗
答案:3 悬赏:60 手机版
解决时间 2021-03-26 14:31
- 提问者网友:难遇难求
- 2021-03-25 18:00
最佳答案
- 五星知识达人网友:杯酒困英雄
- 2020-02-06 20:38
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Add
objPresentation.ApplyTemplate("C:\Program Files\Microsoft Office\Templates\Presentation Designs\Globe.pot")
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery("Select * From Win32_Process")
For Each objProcess in colProcesses
Set objSlide = objPresentation.Slides.Add(1,2)
Set objShapes = objSlide.Shapes
Set objTitle = objShapes.Item("Rectangle 2")
objTitle.TextFrame.TextRange.Text = objProcess.Name
strText = "Working set size: " & objProcess.WorkingSetSize & vbCrLf
strText = strText & "Priority: " & objProcess.Priority & vbCrLf
strText = strText & "Thread count: " & objProcess.ThreadCount & vbCrLf
Set objTitle = objShapes.Item("Rectangle 3")
objTitle.TextFrame.TextRange.Text = strText
Next
objPresentation.SaveAs("C:\Scripts\Process.ppt")
objPresentation.Close
objPPT.Quit
来吧楼主,不要犹豫了,采纳吧。
有问题再沟通!
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Add
objPresentation.ApplyTemplate("C:\Program Files\Microsoft Office\Templates\Presentation Designs\Globe.pot")
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery("Select * From Win32_Process")
For Each objProcess in colProcesses
Set objSlide = objPresentation.Slides.Add(1,2)
Set objShapes = objSlide.Shapes
Set objTitle = objShapes.Item("Rectangle 2")
objTitle.TextFrame.TextRange.Text = objProcess.Name
strText = "Working set size: " & objProcess.WorkingSetSize & vbCrLf
strText = strText & "Priority: " & objProcess.Priority & vbCrLf
strText = strText & "Thread count: " & objProcess.ThreadCount & vbCrLf
Set objTitle = objShapes.Item("Rectangle 3")
objTitle.TextFrame.TextRange.Text = strText
Next
objPresentation.SaveAs("C:\Scripts\Process.ppt")
objPresentation.Close
objPPT.Quit
来吧楼主,不要犹豫了,采纳吧。
有问题再沟通!
全部回答
- 1楼网友:轻熟杀无赦
- 2020-04-20 14:44
当然可以了。可以去WPS论坛找下相关资料。
- 2楼网友:底特律间谍
- 2020-02-04 22:39
你好!
ppt.exe、ppt.vbs即可
希望对你有所帮助,望采纳。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯