I have some code that is giving me a RUn time Error: Slides (unknown member): Failed
It happens on this line:
ActivePresentation.Slides.InsertFromFile _FileDownload, 1, 1, 26
Sub Finish()
Dim URL1 As String
Dim URL2 As String
Dim TextFile As Integer
Dim FilePath As String
Dim FileContent As String
Dim FileDownload As String
Dim i As Long
'PURPOSE: Send All Data From Text File To A String Variable
'File Path of Text File
FilePath = GetDownloadsPath & "\" & "Category Review BUCategory.txt"
'Determine the next file number available for use by the FileOpen function
TextFile = FreeFile
'Open the text file
Open FilePath For Input As TextFile
'Store file content inside a variable
FileContent = Input(LOF(TextFile), TextFile)
'Close Text File
Close TextFile
FileDownload = GetDownloadsPath & "\" & FileContent & ".pptx"
ActivePresentation.Slides.InsertFromFile _
FileDownload, 1, 1, 26
'Delete Text File
Kill FileDownload
End Sub
Any ideas how to correct?