Добрый день!
Что не так? Почему не работает
Что не так? Почему не работает
Код |
---|
Sub ExportDocPDF() Dim objWord As Object, objDocument As Object Set objWord = CreateObject("word.application") Set objDocument = objWord.Documents.Open(Filename:="C:\template.docx") objDocument.ExportAsFixedFormat OutputFileName:="C:\template.pdf", ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:=wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, BitmapMissingFonts:=True, UseISO19005_1:=False 'ActiveDocument.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\template.pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False objDocument.Close: objWord.Quit Set objDocument = Nothing: Set objWord = Nothing End Sub |
Изменено: spacemakerman - 17.02.2018 20:59:00
Я только учусь