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. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,096
    Location
    Firstly are you sure that's the path to the file? ie its a file called filename1.ppt directly on the C drive.

    secondly the code you quote will only insert one slide (assuming it's the right path!)

    syntax is insertfrom file > the (correct) path&filename > The slide number you want to insert after (so 1 is probably good)>The slide number to start inserting from (1 is still good) > THE NUMBER OF SIDES TO INSERT 1 is probably bad!. If you simply omit this last value all slides will be inserted.

    So (assuming the path is correct :
    ActivePresentation.Slides.InsertFromFile_ "c:\filename1.ppt", 1, 1

    For the next file count the slides and start inserting after that number:

    ActivePresentation.Slides.InsertFromFile "the proper path", ActivePresentation.Slides.Count, 1
    Last edited by Aussiebear; 04-08-2023 at 03:52 PM. Reason: Adjusted the code tags
    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
  •