none
Export Project Tasks to Excel using VBA by Custom Field RRS feed

  • Question

  • Question referring to the link:

    http://social.technet.microsoft.com/Forums/projectserver/en-US/9c46458c-893f-41ba-bd46-bdb59c533f4a/export-project-tasks-to-excel-using-vba-by-custom-field?forum=project2010custprog

    Help needed. I have inserted my question at this address for Andrew or anybody else to reply. Hope to hear from you.

    Regards,

    Chuck

    Tuesday, May 27, 2014 3:34 PM

Answers

  • Hello Chuck,

    As you suggested, the XML solution on the other thread doesn't apply as you're on Project 2007, and the ribbon menu wasn't introduced until 2010.

    Adding custom menu options was actually easier in 2007. I no longer have a copy installed, but I think you just right clicked on an empty space on the menu bar and selected customize, and you could add in options there.

    That only gives you the menu option though - you'll need the stuff John sent through to give your menu something to execute.

    Thanks,
    Andrew


    Andrew Simpson
    Founder – Eversight Ltd

    E: info@eversight.co.uk
    W: www.eversight.co.uk

    Download Eversight for MS Project — a free add-on which helps users build high quality schedules with MS project.

    • Marked as answer by chamdan1 Wednesday, May 28, 2014 2:54 PM
    Wednesday, May 28, 2014 1:45 PM

All replies

  • Is it because 2007 does not use Ribbon but Menu instead?

    Chuck

    Tuesday, May 27, 2014 4:12 PM
  • Chuck,

    What exactly are you trying to export (i.e. which custom fields)? I have a macro that I wrote several years ago for exporting the Project Notes field, a a few other select fields, to Excel. It works with all versions of Project and it does require that the user set a reference to the Excel Object library. I have provided it to a whole lot of users. If you are interested in my macro, contact me at the address below. I will ask some questions.

    And by the way, that's supposed to be an ice cold beer, not just a cool beer.

    John

    jensenljatatfastmaildotdotfm

    (remove obvious redundancies and the 7th character is a letter)

    Tuesday, May 27, 2014 4:53 PM
  • Hi John,
    I would love to get a copy of the workbook you mentioned if you don't mind. On the other hand my question referring to the forum request :
    http://social.msdn.microsoft.com/Forums/en-US/c9477237-c964-4a39-b16e-3cd4a21a7e5e/export-project-tasks-to-excel-using-vba-by-custom-field?forum=project2010custprog

    I was trying to use the technique mentioned at that address to insert a button to the toolbar but after searching on the Net I realized that 2007 does not use ribbon but uses Menu instead so the macro that Andrew had used does not work with my version and was wondering how to implement such thing using MS Project 2007.

    By the way It is getting hot here too in Ottawa Canada and I think the icy beer is needed too. :)

    I sent you an email and hope that you'll get it as I followed your instructions in regards to your email.

    Tuesday, May 27, 2014 6:29 PM
  • Chuck,

    Got your e-mail and provided the export macro.

    John

    Tuesday, May 27, 2014 8:28 PM
  • Hello Chuck,

    As you suggested, the XML solution on the other thread doesn't apply as you're on Project 2007, and the ribbon menu wasn't introduced until 2010.

    Adding custom menu options was actually easier in 2007. I no longer have a copy installed, but I think you just right clicked on an empty space on the menu bar and selected customize, and you could add in options there.

    That only gives you the menu option though - you'll need the stuff John sent through to give your menu something to execute.

    Thanks,
    Andrew


    Andrew Simpson
    Founder – Eversight Ltd

    E: info@eversight.co.uk
    W: www.eversight.co.uk

    Download Eversight for MS Project — a free add-on which helps users build high quality schedules with MS project.

    • Marked as answer by chamdan1 Wednesday, May 28, 2014 2:54 PM
    Wednesday, May 28, 2014 1:45 PM
  • Thank you Andrew for getting back to me and I have found somewhere on the net the following macro that would do the job for the version 2007. Here is a copy for those that may need it.

    Option Explicit
     
    Sub CreateMenus()
    
    Dim cbrMain As CommandBar
    Dim ctlMain As CommandBarControl
    
    Dim ctlOLExport1 As CommandBarControl
    Dim ctlOLExport2 As CommandBarControl
    Dim ctlOLExport3 As CommandBarControl
      
      Set cbrMain = Application.CommandBars.ActiveMenuBar
      Set ctlMain = cbrMain.Controls.Add(Type:=msoControlPopup, Temporary:=True)
      ctlMain.Caption = "Export to Outlook"
      
      Set ctlOLExport1 = ctlMain.CommandBar.Controls.Add(Type:=msoControlButton)
      With ctlOLExport1
        .Caption = "Selection to Outlook tasks"
        .OnAction = "Macro """ & "Export_Selection_To_OL_Tasks"""
      End With
    
      Set ctlOLExport2 = ctlMain.CommandBar.Controls.Add(Type:=msoControlButton)
      With ctlOLExport2
        .Caption = "Selection to Outlook appointments"
        .OnAction = "Macro """ & "Export_Selection_To_OL_Appointments"""
      End With
      
      Set ctlOLExport3 = ctlMain.CommandBar.Controls.Add(Type:=msoControlButton)
      With ctlOLExport3
        .Caption = "Selection to Outlook notes"
        .OnAction = "Macro """ & "Export_Selection_To_OL_Notes"""
      End With
      
    End Sub
    
    

    Cheers!

    Chuck

    Wednesday, May 28, 2014 2:57 PM