This Excel macro below should convert all .Docx into the selected folder to .Pdf
Here is the code line which provide me the error Code 429, But several hours ago this same line of code was working.
Documents.Open (filePath & currFile) 'Error Code 429
Here the full macro's code
Sub ConvertDocxInDirToPDF()
Dim filePath As String
Dim currFile As String
filePath = ActiveWorkbook.Path & "\"
MsgBox filePath
currFile = Dir(filePath & "*.docx")
Do While currFile <> ""
Documents.Open (filePath & currFile) 'Error Code 429
Documents(currFile).ExportAsFixedFormat _
OutputFileName:=filePath & Left(currFile, Len(currFile) - Len(".docx")) & ".pdf", _
ExportFormat:=17
Documents(currFile).Close
currFile = Dir()
Loop
Application.ScreenUpdating = True
End Sub
Is there a simple way to make this macro working and to fix this error.
Best regards.