-- 作者:大红袍
-- 发布时间:2015/12/28 9:16:00
--
用代码另存为pdf。
Dim App As New MSExcel.Application try Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("d:\\test.xls") \'创建Excel文件对应的PDF文件 wb.Saved = True wb.ExportAsFixedFormat(MSExcel.XlFixedFormatType.xlTypePDF, "d:\\test.pdf", MsExcel.XlFixedFormatQuality.xlQualityStandard, True, False, System.Reflection.Missing.Value, System.Reflection.Missing.Value, True, System.Reflection.Missing.Value) app.quit catch ex As exception msgbox(ex.message) app.quit End try
|