When I open a cmd prompt in windows 10 and run
"C:\Users\jagi\Downloads\xpdf304\bin64\pdfinfo.exe" "C:\Users\jagi\Dropbox\#Lyrics\Aanand Mangal Karu Aarti.pdf"|find "Pages:">"C:\Users\jagi\Dropbox\#Lyrics\numpages.txt"
it works fine and creates a text file called numpages.txt in the correct directory. However when I use excel vba, it runs but does not create any text file that I desire. My code looks like
Sub testruncmd()
Dim ggg As String
ggg = """C:\Users\jagi\Downloads\xpdf304\bin64\pdfinfo.exe""" & " " & _
"""C:\Users\jagi\Dropbox\#Lyrics\Aanand Mangal Karu Aarti.pdf""" & _
"|find" & " " & """Pages:""" & ">" & _
"""C:\Users\jagi\Dropbox\#Lyrics\numpages.txt"""
MsgBox ggg
Shell ggg
End Sub
Any ideas? Also I want the shell to finish executing before carrying on further.
Many thanks
"C:\Users\jagi\Downloads\xpdf304\bin64\pdfinfo.exe" "C:\Users\jagi\Dropbox\#Lyrics\Aanand Mangal Karu Aarti.pdf"|find "Pages:">"C:\Users\jagi\Dropbox\#Lyrics\numpages.txt"
it works fine and creates a text file called numpages.txt in the correct directory. However when I use excel vba, it runs but does not create any text file that I desire. My code looks like
Sub testruncmd()
Dim ggg As String
ggg = """C:\Users\jagi\Downloads\xpdf304\bin64\pdfinfo.exe""" & " " & _
"""C:\Users\jagi\Dropbox\#Lyrics\Aanand Mangal Karu Aarti.pdf""" & _
"|find" & " " & """Pages:""" & ">" & _
"""C:\Users\jagi\Dropbox\#Lyrics\numpages.txt"""
MsgBox ggg
Shell ggg
End Sub
Any ideas? Also I want the shell to finish executing before carrying on further.
Many thanks