Customizing reports with Vba MS Project

回答済み Customizing reports with Vba MS Project

  • 29 Juni 2010 19:22
     
     

    Hello Forum,

    I am from the Netherlands, and I am using the  book Vba MS Project programming. 

    I am teaching Office, MS Project, Vba and some more software tools. 

    For one of our clients we need to make reports. MS Project has a lot of reports build in, but can we also program new reports or customize existing reports with Vba in MS Project? 

    Kind regard,

    Gert Wolters

Semua Balasan

  • 29 Juni 2010 20:42
    Moderator
     
     

    Hi Gert,

    If you search for Report in the MSProject library in the VBE, you'll find the related methods and properties. In general, the VBA commands duplicate some of the ribbon commands, for example, run Application.VisualReports in the Immediate pane in the VBE. You can list, create, or edit visual reports, but VBA brings up the UI for that operation (or starts Excel or Visio for the specified report type). You can certainly create add-ins for Excel or Visio for further automation.

    The Application.Reports method just brings up the old-style project Reports dialog box. Project.ReportList simply lists the old-style reports.

    --Jim

  • 30 Juni 2010 8:03
    Moderator
     
     Jawab
    Further to Jim's advice, try recording a VBA macro of you creating a new report. I don't think much will get recorded and that is a good indication that you've hit VBA's limit.  Try also searching the Object Browser (Press F2 in the VBE). That also will show few results for Project.

    --

    Rod Gill
    Microsoft MVP for Project - http://www.project-systems.co.nz
     
    Author of the only book on Project VBA, see: http://www.projectvbabook.com
     

     
    "Jim Corbin - MSFT" wrote in message news:bf2837e6-c8a3-445c-8aa7-85c4db75f539...

    Hi Gert,

    If you search for Report in the MSProject library in the VBE, you'll find the related methods and properties. In general, the VBA commands duplicate some of the ribbon commands, for example, run Application.VisualReports in the Immediate pane in the VBE. You can list, create, or edit visual reports, but VBA brings up the UI for that operation (or starts Excel or Visio for the specified report type). You can certainly create add-ins for Excel or Visio for further automation.

    The Application.Reports method just brings up the old-style project Reports dialog box. Project.ReportList simply lists the old-style reports.

    --Jim



    __________ Information from ESET Smart Security, version of virus signature database 5238 (20100629) __________

    The message was checked by ESET Smart Security.

    http://www.eset.com

    The one and only Project VBA Book Rod Gill Project Management