2 Replies Latest reply: May 15, 2014 9:55 AM by Nick Osdale-Popa RSS

    JetExportSummary

    hermanifer _

      I am trying to run VB code to automate the loading of projects and the exporting of summaries.  I am having trouble finding a way to export a project with numerous summary tabs.  Is there a way to specify which summary to export?

        • JetExportSummary
          Nick Osdale-Popa

          You can use the CurrentSummary command to set which summary to export such as:

           

          objMonarch.CurrentSummary "Profit Margins"

           

          Will set the summary to export to "Profit Margins" when the JetExportSummary() function is executed.

          • JetExportSummary
            Nick Osdale-Popa

            If you want to export each summary you will need to use a combination of several property methods:

             

            SummaryCount

            CurrentSummary

            GetSummaryNameAt

             

            Very rough idea of the code

            [font="courier"]For idx = 0 to ObjMonarch.SummaryCount - 1

                summary = objMonarch.GetSummaryNameAt(idx)

                ObjMonarch.CurrentSummary Summary

                IsExported = ObjMonarch.JetExportSummary(sExportFile, Summary, fOverwrite)

                'Raise Error if Summary export failed

                If IsExported = False Then

                    sProblem = "Error Exporting Summary: " & Summary

                    Err.Raise vbObject + SummaryErr, "Monarch", sProblem

                End If

            Next idx[/font][/quote]