Option Explicit
Doc2PDF WScript.Arguments(0),WScript.Arguments(1)
Sub Doc2PDF( myFile, tofile )
' This subroutine opens a Word document, then saves it as PDF, and closes Word.
' If the PDF file exists, it is overwritten.
' If Word was already active, the subroutine will leave the other document(s)
' alone and close only its "own" document.
'
' Requirements:
' This script requires the "Microsoft Save as PDF or XPS Add-in for 2007
' Microsoft Office programs", available at:
' http://www.microsoft.com/downloads/details.aspx?
' familyid=4D951911-3E7E-4AE6-B059-A2E79ED87041&displaylang=en
'
' Written by Rob van der Woude
' http://www.robvanderwoude.com
' Standard housekeeping
Dim objDoc, objFile, objFSO, objWord, strFile, strPDF
Const wdFormatDocument = 0
Const wdFormatDocument97 = 0
Const wdFormatDocu
DOC转PDF的vbs脚本
最新推荐文章于 2024-07-10 14:03:53 发布
这是一个将DOC文档转换为PDF的VBScript示例,它将文件'D:a.doc'转换为'D:a.pdf'。
摘要由CSDN通过智能技术生成