1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

How to open a Powerpoint file from VB 2010?

Discussion in 'Visual Basic ( VB )' started by peterkentt, Jul 7, 2012.

  1. peterkentt

    peterkentt New Member

    Joined:
    Jun 24, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  2. Scripting

    Scripting John Hoder

    Joined:
    Jun 29, 2010
    Messages:
    421
    Likes Received:
    57
    Trophy Points:
    0
    Occupation:
    School for life
    Location:
    /root
    have you tried using the folder the name of which is without any spaces?
     
  3. peterkentt

    peterkentt New Member

    Joined:
    Jun 24, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Thank you!

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

    Scripting John Hoder

    Joined:
    Jun 29, 2010
    Messages:
    421
    Likes Received:
    57
    Trophy Points:
    0
    Occupation:
    School for life
    Location:
    /root
    Your welcome :)
     

Share This Page