Hi,
I have a number of wordfiles listed in an excel sheet, need to convert all the filenames listed to pdf. used below macro, giving error. I wonder if any one of you can help me in this regard.
![]()
Sub ExportFile() For I = 1 To Range("A2").End(xlDown).Row oldName = Cells(I, 1).Value newName = Cells(I, 2).Value Set Documents = GetObject(oldName) ActiveDocument.ExportAsFixedFormat , Filename:=newName, ExportFormat:=wdExport.pdf Next End Sub
Bookmarks