How to open a Powerpoint file from VB 2010?

Newbie Member
8Jul2012,03:47   #1
peterkentt's Avatar
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
John Hoder
8Jul2012,17:03   #2
Scripting's Avatar
have you tried using the folder the name of which is without any spaces?
Newbie Member
14Jul2012,23:48   #3
peterkentt's Avatar
Thank you!

That was the matter! Folders' names cannot have spaces.
John Hoder
16Jul2012,15:30   #4
Scripting's Avatar
Quote:
Originally Posted by peterkentt View Post
Thank you!

That was the matter! Folders' names cannot have spaces.
Your welcome