Sub create_ppts()
Dim slidecount As Integer
  Dim slide As slide, PPSlide As slide
    Dim shp As Shape
    Dim ppres As Presentation, pp As Presentation

    Dim filepath As String
    Dim a()
    filepath = "c:\"

a = Array("XA", "XB")

Set pp = ActivePresentation
For i = LBound(a) To UBound(a)

  Set ppres = Application.Presentations.Add
  slidecount = 1

   For Each slide In pp.Slides
      If slide.NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.Text =
a(i) Then

  slide.Copy

ppres.Slides.Paste
End If

Next

'save and close ur ppt here  with name wise
Next i

End Sub


On Thu, Oct 6, 2011 at 5:16 PM, Chandra Shekar <chandrashekarb....@gmail.com
> wrote:

> Hello Ashish,
>
> In your code I need a small change as shown in attached file instead of
> taking search string in TITLE I need code to search as shown in attached
> image.
>
> Thanks in advance.
>
> Regards,
>
> Chandra Shekar B
>
>
> On Tue, Oct 4, 2011 at 4:43 PM, Chandra Shekar <
> chandrashekarb....@gmail.com> wrote:
>
>> Thanks Ashish its working fine :)
>>
>>
>> On Tue, Oct 4, 2011 at 9:36 AM, ashish koul <koul.ash...@gmail.com>wrote:
>>
>>> try something like this
>>>
>>>  Sub create_ppts()
>>> Dim slidecount As Integer
>>>   Dim slide As slide, PPSlide As slide
>>>     Dim shp As Shape
>>>     Dim ppres As Presentation, pp As Presentation
>>>
>>>     Dim filepath As String
>>>     Dim a()
>>>     filepath = "c:\"
>>>
>>> a = Array("A", "B")
>>>
>>> Set pp = ActivePresentation
>>> For i = LBound(a) To UBound(a)
>>>
>>>   Set ppres = Application.Presentations.Add
>>>   slidecount = 1
>>>
>>>    For Each slide In pp.Slides
>>>          For Each shp In slide.Shapes
>>>             If shp.TextFrame.TextRange.Text = a(i) Then
>>>   slide.Copy
>>>
>>> ppres.Slides.Paste
>>> End If
>>> Next
>>> Next
>>>
>>> save and close ur ppt here  with name wise
>>> Next i
>>>
>>> End Sub
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Oct 4, 2011 at 12:14 PM, Chandra Shekar <
>>> chandrashekarb....@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> Any help on below request pls.
>>>>
>>>> Thanks,
>>>>
>>>> Chandra Shekar B
>>>>
>>>>   On Mon, Oct 3, 2011 at 11:31 AM, Chandra Shekar <
>>>> chandrashekarb....@gmail.com> wrote:
>>>>
>>>>> Hello Swapnil,
>>>>>
>>>>> Thanks for the code, but I am not getting desired output bcoz its
>>>>> copying once one slide into the new presentation.
>>>>>
>>>>> Please find attached file for the exact output.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Chandra Shekar B
>>>>>
>>>>>   On Mon, Oct 3, 2011 at 9:21 AM, Swapnil Palande <
>>>>> palande.swapni...@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Use following code
>>>>>>
>>>>>> Sub createPPT()
>>>>>>     Dim slide As slide
>>>>>>     Dim shp As Shape
>>>>>>     Dim mypresentation As Presentation
>>>>>>     Dim filepath As String
>>>>>>
>>>>>>     filepath = ActivePresentation.Path
>>>>>>
>>>>>>     For Each slide In ActivePresentation.Slides
>>>>>>         For Each shp In slide.Shapes
>>>>>>             If shp.TextFrame.TextRange.Text = "XYZ 1" Then
>>>>>>                 Set mypresentation =
>>>>>> Application.Presentations.Add(msoTrue)
>>>>>>                 slide.Copy
>>>>>>                 mypresentation.Slides.Paste
>>>>>>                 mypresentation.SaveAs filepath & "\xyz1.pptx"
>>>>>>                 mypresentation.Close
>>>>>>             ElseIf shp.TextFrame.TextRange.Text = "XYZ 2" Then
>>>>>>                 Set mypresentation =
>>>>>> Application.Presentations.Add(msoTrue)
>>>>>>                 slide.Copy
>>>>>>                 mypresentation.Slides.Paste
>>>>>>                 mypresentation.SaveAs filepath & "\xyz2.pptx"
>>>>>>                 mypresentation.Close
>>>>>>             ElseIf shp.TextFrame.TextRange.Text = "XYZ 3" Then
>>>>>>                 Set mypresentation =
>>>>>> Application.Presentations.Add(msoTrue)
>>>>>>                 slide.Copy
>>>>>>                 mypresentation.Slides.Paste
>>>>>>                 mypresentation.SaveAs filepath & "\xyz3.pptx"
>>>>>>                 mypresentation.Close
>>>>>>             End If
>>>>>>         Next shp
>>>>>>     Next
>>>>>>
>>>>>>     Set mypresentation = Nothing
>>>>>> End Sub
>>>>>> Pls find attached ppt.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Swapnil.
>>>>>>
>>>>>>   On Mon, Oct 3, 2011 at 11:59 AM, Chandra Shekar <
>>>>>> chandrashekarb....@gmail.com> wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> Any help on this. Thanks in advance.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Chandra Shekar B
>>>>>>>
>>>>>>> On Fri, Sep 30, 2011 at 8:47 AM, Chandra Shekar <
>>>>>>> chandrashekarb....@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I am looking for a macro which can copy slides based on TITLE and
>>>>>>>> create a new presentation. Could u please help me out in the attached 
>>>>>>>> file.
>>>>>>>>
>>>>>>>> In this case I need create 4 PPTs i.e. for
>>>>>>>> 1) Title A one PPT with same file name as Title,
>>>>>>>> 2) Title B one PPT with same file name as Title,
>>>>>>>> 3) Title C one PPT with same file name as Title,
>>>>>>>> 4) Title D one PPt with same file name as Title.
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Chandra Shekar B
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> ----------------------------------------------------------------------------------
>>>>>>>> Some important links for excel users:
>>>>>>>> 1. Follow us on TWITTER for tips tricks and links :
>>>>>>>> http://twitter.com/exceldailytip
>>>>>>>> 2. Join our LinkedIN group @
>>>>>>>> http://www.linkedin.com/groups?gid=1871310
>>>>>>>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>>>>>>>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>>>>>>>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>>>>>>>
>>>>>>>> To post to this group, send email to excel-macros@googlegroups.com
>>>>>>>>
>>>>>>>> <><><><><><><><><><><><><><><><><><><><><><>
>>>>>>>> Like our page on facebook , Just follow below link
>>>>>>>> http://www.facebook.com/discussexcel
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> ----------------------------------------------------------------------------------
>>>>>>> Some important links for excel users:
>>>>>>> 1. Follow us on TWITTER for tips tricks and links :
>>>>>>> http://twitter.com/exceldailytip
>>>>>>> 2. Join our LinkedIN group @
>>>>>>> http://www.linkedin.com/groups?gid=1871310
>>>>>>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>>>>>>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>>>>>>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>>>>>>
>>>>>>> To post to this group, send email to excel-macros@googlegroups.com
>>>>>>>
>>>>>>> <><><><><><><><><><><><><><><><><><><><><><>
>>>>>>> Like our page on facebook , Just follow below link
>>>>>>> http://www.facebook.com/discussexcel
>>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> ----------------------------------------------------------------------------------
>>>>>> Some important links for excel users:
>>>>>> 1. Follow us on TWITTER for tips tricks and links :
>>>>>> http://twitter.com/exceldailytip
>>>>>> 2. Join our LinkedIN group @
>>>>>> http://www.linkedin.com/groups?gid=1871310
>>>>>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>>>>>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>>>>>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>>>>>
>>>>>> To post to this group, send email to excel-macros@googlegroups.com
>>>>>>
>>>>>> <><><><><><><><><><><><><><><><><><><><><><>
>>>>>> Like our page on facebook , Just follow below link
>>>>>> http://www.facebook.com/discussexcel
>>>>>>
>>>>>
>>>>>
>>>> --
>>>>
>>>> ----------------------------------------------------------------------------------
>>>> Some important links for excel users:
>>>> 1. Follow us on TWITTER for tips tricks and links :
>>>> http://twitter.com/exceldailytip
>>>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>>>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>>>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>>>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>>>
>>>> To post to this group, send email to excel-macros@googlegroups.com
>>>>
>>>> <><><><><><><><><><><><><><><><><><><><><><>
>>>> Like our page on facebook , Just follow below link
>>>> http://www.facebook.com/discussexcel
>>>>
>>>
>>>
>>>
>>> --
>>> *Regards*
>>> * *
>>> *Ashish Koul*
>>> *http://www.excelvbamacros.com/*
>>>
>>>
>>> P Before printing, think about the environment.
>>>
>>>
>>>   --
>>>
>>> ----------------------------------------------------------------------------------
>>> Some important links for excel users:
>>> 1. Follow us on TWITTER for tips tricks and links :
>>> http://twitter.com/exceldailytip
>>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>>
>>> To post to this group, send email to excel-macros@googlegroups.com
>>>
>>> <><><><><><><><><><><><><><><><><><><><><><>
>>> Like our page on facebook , Just follow below link
>>> http://www.facebook.com/discussexcel
>>>
>>
>>
>


-- 
*Regards*
* *
*Ashish Koul*
*http://www.excelvbamacros.com/*


P Before printing, think about the environment.

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to