Hello There,
I have the below code which runs a sheel command to open a pdf file. The application does open but the file does not open. If I remove the space from the file name the pdf file opens. Could you please help in providing a generic VBA code to open a file. Which can handle both a space and a no space in the filename?
	
	
	
		
Thank you & regards,
Don
				
			I have the below code which runs a sheel command to open a pdf file. The application does open but the file does not open. If I remove the space from the file name the pdf file opens. Could you please help in providing a generic VBA code to open a file. Which can handle both a space and a no space in the filename?
		Code:
	
	Sub tt()
  Dim AdobeExecutable As String, AdobeFile As String, StartAdobe
  AdobeExecutable = "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe"
  AdobeFile = "E:\ABC dd.pdf"
   
  StartAdobe = Shell("" & AdobeExecutable & " " & AdobeFile & "", 0)
End SubThank you & regards,
Don
