Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi!

    The following macro does not seem to work in PowerPoint 2007:

    Code:
    Private Sub SelectAll()
    	
    	'Open any ppt documen
    	Presentations.Open "C:\test.ppt"
    
    	'Select the whole presentation
    	ActivePresentation.Slides.Range.Select
    	
    End Sub
    Its purpose is to select all the slides in the presentation (i'll need
    to get their whole TextRange later on).

    When you run it, only the last slide get selected... Note that the macro is
    working on PowerPoint 2003.

    Any idea why? Any workaround?

  2. #2
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,593
    Thanks
    5
    Thanked 1,059 Times in 928 Posts
    [quote name='gfox' post='794407' date='22-Sep-2009 07:44']Hi!

    The following macro does not seem to work in PowerPoint 2007:

    Code:
    Private Sub SelectAll()
    	
    	'Open any ppt documen
    	Presentations.Open "C:\test.ppt"
    
    	'Select the whole presentation
    	ActivePresentation.Slides.Range.Select
    	
    End Sub
    Its purpose is to select all the slides in the presentation (i'll need
    to get their whole TextRange later on).

    When you run it, only the last slide get selected... Note that the macro is
    working on PowerPoint 2003.

    Any idea why? Any workaround?[/quote]

    The object model has changed in PowerPoint 2007. See Slides Object for a discussion and examples. You should also see TextRange Object to check your code for that object.

    Joe
    Joe

  3. #3
    3 Star Lounger
    Join Date
    Feb 2007
    Location
    Durham, Durham, United Kingdom
    Posts
    286
    Thanks
    0
    Thanked 10 Times in 10 Posts
    This is a bug / feature in 2007.

    There is almost certainly no need to select all the slides to get the textrange. If you post exactly what you need to do ....

Posting Permissions

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