Freigeben über


Does Macro work with TFS?

If you are using Microsoft excel,project for some times, you might find using macros really ease your daily job.
So, when come to integration excel and project with TFS, does macro still work with TFS?
In fact, you can still create your own macro to call the TFS add-in control on excel and project.

For example, you want to Publish workitems to TFS

Function refresh()
        Dim refreshButton As CommandBarControl
        Set refreshButton = Application.CommandBars.FindControl(Tag:="IDC_REFRESH")

        If refreshButton.Enabled Then
            refreshButton.Execute
        Else
            MsgBox "Refresh button not enabled!"
        End If
End Function

Function publish()
        Dim publishButton As CommandBarControl
        Set publishButton = Application.CommandBars.FindControl(Tag:="IDC_SYNC"
        If publishButton.Enabled Then
            publishButton.Execute
        Else
            MsgBox "Publish button not enabled!"
        End If
End Function

Read this blog, discuss on how to use macro code to invoke the TFS add-in controls. You also can find a list of the control tags for excel and project from the blog.

Comments

  • Anonymous
    March 23, 2007
    J.D. Meier on Team Foundation Server Branching Guidance Now Available. Jeff Beehler on Branching guidance...

  • Anonymous
    July 10, 2009
    I'm looking for something really simple, entering text in to the history field of a TFS work item.  I've tried to record a macro, and enter text, but nothing is saved in the macro.  I have tried entering data in other fields in other projects (like c# code) but that macro doesn't work in TFS.  Any ideas?