tags:

views:

29

answers:

2

Hi everyone, I try to record a macro so that I can quickly open the History of my project in Source Control but the macro when played raises an error "Object variable or With block variable not set".

How can I get rid of that and make the macro work? Or is there any other way to do it? Please help!

Nam.

[Edit] The steps recorded in my macro: Open Team Explorer - Open Source Control - Right click a project - Select History.

+1  A: 

Have you tried using Team Foundation Sidekicks?

This comes with a History Sidekick that is realy poswerfull and most likely shows what you need.

alt text Figure: Easily view the history of any project

It also would be pretty easy to build a custom tool using the TFS SDK that displayed the history any way you choose.

MrHinsh
A: 

I recorded this macro. Works fine for me, except a "Error HRESULT E_FAIL has been returned from a call to a COM component" error :) but opens the history

 Sub TemporaryMacro()
        DTE.ExecuteCommand("View.TeamExplorer")
        DTE.Windows.Item("{131369F2-062D-44A2-8671-91FF31EFB4F4}").Activate() 'Team Explorer
        DTE.ActiveWindow.Object.GetItem("your_tfs_server\your_project\Source Control").Select(vsUISelectionType.vsUISelectionTypeSelect)
        DTE.ActiveWindow.Object.DoDefaultAction()
        DTE.Windows.Item("{99B8FA2F-AB90-4F57-9C32-949F146F1914}").Activate() 'Source Control Explorer
        DTE.Windows.Item("{2456BD12-ECF7-4988-A4A6-67D49173F565}").Activate() 'History - $/ProjectName
        DTE.ExecuteCommand("File.TfsHistory")
    End Sub
bahadir arslan
I tried yours but it doesn't work for me.
Nam Gi VU
So, in my opinion the GUID's may be different per machine or installation. Did you edit this line for your settings? DTE.ActiveWindow.Object.GetItem("your_tfs_server\your_project\Source Control").Select(vsUISelectionType.vsUISelectionTypeSelect)
bahadir arslan