无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 657|回复: 2
打印 上一主题 下一主题

怎样将ppt文件转换成doc文件

[复制链接]
跳转到指定楼层
1#
发表于 2004-3-7 13:46:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
由于学习需要,要将ppt文件转换成doc文件,可是试了一下,并没有这个功能啊,应该怎么弄,有朋友知道吗?
2#
发表于 2004-3-7 16:05:52 | 只看该作者

怎样将ppt文件转换成doc文件

这个你需要编写VBA程序了,帮你在网上搜了一下,代码如下:
Attribute VB_Name = "PPT2Doc"
Sub PPT2Doc()
'
' PPT2Doc Macro
' Macro created 8/20/2003 by Harveer Singh
' (c) Harveer Singh, 2003
' Released under GPL http://www.opensource.org/licenses/gpl-license.html
' Please maintain this copyright notice in all modified versions of this code
' This code is provided 'as-is' and no warranties are provided.

On Error Resume Next
' Dummy Breakpoint - You might want to put a breakpoint here, since w/o breaking the code atleast once,
' only first slide will be copied.
Debug.Print ""
' Dummy Breakpoint Over
Dim aPPT As PowerPoint.Application
Dim i
Dim sld
Dim presName As String
Dim slideCount As Integer
Dim startTime, endTime As Date
Dim originalItalicStatus, originalBoldStatus As Boolean
    startTime = Time
    originalItalicStatus = Application.Selection.Font.Italic
    originalBoldStatus = Application.Selection.Font.Bold
   
    Set aPPT = CreateObject("PowerPoint.Application")
    presName = Left(aPPT.ActivePresentation.Name, Len(aPPT.ActivePresentation.Name) - 4)
   
    sld = 1
    slideCount = aPPT.ActivePresentation.Slides.Count
   
    For i = 1 To slideCount
        With aPPT.ActiveWindow
            .Activate
            .View.GotoSlide Index:=sld
            .Selection.SlideRange.Shapes.SelectAll
            
            .Selection.ShapeRange.Copy
            
        End With
   
        With Selection
            Application.Activate
            tempStr = presName & vbTab & "Slide #" & Str(sld) & " of" & Str(slideCount) & vbCrLf & vbCrLf
            .Font.Name = "Verdana"
            .TypeText (tempStr)
            .Font.Italic = True
            .Paste
            .EndKey Unit:=wdStory
            .InsertBreak Type:=wdPageBreak
            .Font.Italic = False
        End With
   
        sld = sld + 1
    Next i
   
    Application.ActiveDocument.SaveAs (presName & " (DOC version)")
   
    endTime = Time
   
    With Selection
        tempStr = "Summary" & vbCrLf & vbCrLf
        .Font.Bold = True
        .TypeText (tempStr)
        .Font.Bold = False
        
        
        tempStr = "Converted from "
        .TypeText (tempStr)
        
        .Font.Italic = True
        tempStr = aPPT.ActivePresentation.FullName
        .TypeText (tempStr)
        
        .Font.Italic = False
        tempStr = " on " & Date & vbCrLf & vbCrLf
        
        .TypeText (tempStr)
        
        tempStr = "Saved As "
        .TypeText (tempStr)
        
        .Font.Italic = True
        .Font.Bold = True
        tempStr = Application.ActiveDocument.FullName & vbCrLf & vbCrLf
        .TypeText (tempStr)
        .Font.Italic = False
        .Font.Bold = False
        
        tempStr = "Slides converted: " & slideCount & vbCrLf & vbCrLf
        .Font.Italic = True
        .TypeText (tempStr)
        .Font.Italic = False
        
        .Font.Italic = True
        
        tempStr = "Time Taken: " & DateDiff("s", startTime, endTime) & " seconds"
        .TypeText (tempStr)
        
        .Font.Italic = originalItalicStatus
        .Font.Bold = originalBoldStatus
        
    End With
   
    Application.ActiveDocument.Save
    Application.ActiveDocument.Activate
   
End Sub

回复

使用道具 举报

3#
发表于 2004-4-7 17:42:10 | 只看该作者

怎样将ppt文件转换成doc文件

好!好!!好!!!
回复

使用道具 举报

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

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2026-2-20 04:58

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表