求助各位大佬,怎么使用VB把execl2003模板赋值以后保存到一个指定文件夹里,并且转换成PDF格式
Dim xlApp As Excel.ApplicationDim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Dim strDestination As String
Dim strSource As String
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
strSource = App.Path + "\rijiaoyan.xlsx" '确定模板
strDestination = "d:\rijiaoyan.xlsx" '要保存到的位置
FileCopy strSource, strDestination '保持一个干净的模板
Set xlBook = xlApp.Workbooks.Open(strDestination)
Set xlSheet = xlBook.Worksheets(1)
xlSheet.Cells(5, 2).Value = Me.Text2(0).Text
xlSheet.Cells(6, 2).Value = Me.Text2(1).Text '
xlSheet.Cells(7, 2).Value = Me.Text2(2).Text ''
xlBook.SaveAs "D:\shuju\" + CStr(Me.Text4.Text) + ".xlsx"'此处是将表格保存到D盘shuju文件夹里,格式还是.xlsx
请问怎么转成PDF,或者是图片格式也可以只要不能再编辑既可以。