2 Replies Latest reply: Feb 16, 2012 9:16 AM by rsp-port RSS

    Chart with Condition (Export)

      Hello at all,

       

      i want to export some Charts to PowerPoint. I have realized it. But

      i have 5 Charts they have a condition. And these Charts will not be exported.

      Is there a function to prove a Chart that have a condition and set this to true?

      Or some thing else?

       

      Greets

        • Chart with Condition (Export)
          Ashok Chandran

          Hi

           

                    Give me some example please

            • Chart with Condition (Export)

              Here the VB Script:

               

              'Alle Charts sortiert nach PowerPoint übergeben

              sub Sortieren_Alle

               

              Set PPApp = CreateObject("Powerpoint.Application")

              PPApp.Visible = True ' Create a presentation

              Set PPPres = PPApp.Presentations.Add

               

              set s=ActiveDocument.Sheets("TV")

              charts=s.GetGraphs

               

              for i = UBound(charts) - 1 To 0 Step -1

                 for j= 0 to i 

                  if charts(j).getobjectid>charts(j+1).getobjectid then   

                  set temp=charts(j+1)  

                  set charts(j+1)=charts(j)

                    set charts(j)=temp 

                      end if

                  next

              next

               

              for i=lbound(charts) to ubound(charts)

                 Set PPSlide = PPPres.Slides.Add(1, 1)

                'PPSlide.Shapes(1).Delete ' removes the title

                'PPSlide.Shapes(1).Delete ' removes the text box

                'Wenn das Chart minimiert ist dann muss es maximiert werden um exportiert zu werden

                IF ActiveDocument.GetSheetObject(charts(i).getobjectid).isMinimized Then

                ActiveDocument.GetSheetObject(charts(i).getobjectid).maximize

                END IF

                ActiveDocument.GetSheetObject(charts(i).getobjectid).CopyBitmapToClipboard

                ActiveDocument.GetSheetObject(charts(i).getobjectid).minimize

               

                with PPSlide.Shapes.Paste

                    .Left = 0

                    .Top = 30

                    .Width=720

              end with

              next

               

              PPPres.SaveAs "C:\Alle_Charts.ppt"

              'PPPres.Close

              'PPApp.Quit

              Set PPSlide = Nothing

              Set PPPres = Nothing

              Set PPApp = Nothing

               

              end sub

               

               

               

               

              The Chart with the ID CH31 for example have the condition

               

              GetFieldSelections(Selektion_TV) = 'Übersicht'

               

              should open the Chart with the ID CH40