Thread: PDF to Excel
View Single Post
 
Old 02-13-2014, 09:16 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Option Explicit
Dim strPDF As String, strTXT As String

Sub Refresh()
strPDF = "ThisWorkbook.Path & "\" & "ProductCatalog.pdf"
strTXT = Split(strPDF, ".pdf")(0) & ".txt"
If Dir(strPDF) <> "" Then Kill strPDF
If Dir(strTXT) <> "" Then Kill strTXT
Call DownloadFile
Call Convert_PDF_To_Text_File
Call UpdatePrices
End Sub
Having defined strPDF and strTXT this way, you don't need to redefine those references later on - you can simply reference the existing ones.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote