Results 1 to 19 of 19

Thread: Simple Macro to import slides from a file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #16
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,096
    Location
    I see the difference now but it should NOT be within the loop.

    strFileName = Dir$(strFPath & strSpec) Finds the first file in the Folder that has a pptx ending

    In the loop strFileName = Dir() finds the NEXT file that matches

    Your line

    strFileName = strFPath & strSpec

    Would look for a file with path:

    C:\Users\JohnDesktop\data\*.PPTX

    Which cannot exist because * is not an acceptable name
    Last edited by John Wilson; 08-10-2016 at 09:07 AM.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •