Consulting

Results 1 to 2 of 2

Thread: Add a file to the end of a presentation

  1. #1
    VBAX Newbie
    Joined
    Jul 2008
    Posts
    1
    Location

    Add a file to the end of a presentation

    I'm trying to add a seperate ppt file to the end of a presentation. I can add it after a page:-

    Sub AddEndPage()
    ActivePresentation.Slides.InsertFromFile _
    "C:\Data\KPI's\End Page.ppt", 1, 1
    End Sub

    The problem is the active file could contain varying numbers of pages, so rather than saying "put this after this page" I want to say "put this at the end.

  2. #2
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    the end of the document will be
    [VBA]ActivePresentation.Slides.Count[/VBA]
    so try this:
    [VBA]
    Sub AddEndPage()
    ActivePresentation.Slides.InsertFromFile _
    "C:\Data\KPI's\End Page.ppt", ActivePresentation.Slides.Count, 1
    End Sub

    [/VBA]

Posting Permissions

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