Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   How to open a Powerpoint file from VB 2010? (http://www.go4expert.com/forums/powerpoint-file-vb-2010-t28686/)

peterkentt 8Jul2012 03:47

How to open a Powerpoint file from VB 2010?
 
This is what I'm doing: (using VB 2010 Express)

Dim showFile as Double

showFile = Shell("C:\...POWERPNT.EXE /S C:\Users\MyName\Folder with Files\" & _
"pptFile.ppsx", vbNormalFocus)


When I execute the program a message says:

"PowerPoint cannot read: C:\Users\MyName\Folder ."

then I click OK on the message box and it continues:

"PowerPoint cannot read: with Files\pptFile.ppsx"


Clearly there's something with the folder's name. I've already defined a variable String for the full file's name and then concatenated; no help.

Please help!

This is my first post in this Forum. Forgive any mistakes. Glad to be here!

Peter

Scripting 8Jul2012 17:03

Re: How to open a Powerpoint file from VB 2010?
 
have you tried using the folder the name of which is without any spaces?

peterkentt 14Jul2012 23:48

Re: How to open a Powerpoint file from VB 2010?
 
Thank you!

That was the matter! Folders' names cannot have spaces. :crazy:

Scripting 16Jul2012 15:30

Re: How to open a Powerpoint file from VB 2010?
 
Quote:

Originally Posted by peterkentt (Post 96367)
Thank you!

That was the matter! Folders' names cannot have spaces. :crazy:

Your welcome :)


All times are GMT +5.5. The time now is 18:32.