tags:

views:

8

answers:

1

I have built a macro that formats an already generated SQL Server report. However I was wondering if I could make this even faster by some way bringing up IE first without having to manually do it, fill in the values for the drop down lists, run the report, and choose to export it as an excel file saving it with a dynamic name. However the first hurdle I have to get through is finding out the names of the controls which can change over time as the report is updated and changed.

I was wondering how do I go about looping through the controls to get the names and use the names to set the values. The controls I will be looking for are all drop down lists, and a couple combo box lists in drop down form. Thanks. The standard browser we will be using is IE7 and SQL Server 2007 reporting.

A: 

You can host the webbrowser control http://www.xcelfiles.com/WebBrowserCtrl.html

And you can find the names of and set values of the controls using the document object of the browser control http://www.compuonline.info/2008/09/filling-form-in-webbrowser-control.html

Good luck

bugtussle