Dim app As New MSWord.Application try Dim fileName = "D:\ssss.docx" app.Documents.Open(fileName) app.Documents(fileName).ExportAsFixedFormat("D:\w.pdf", MSWord.WdExportFormat.wdExportFormatPDF) catch ex As exception msgbox(ex.message) finally app.Quit End try