I want to set Portrait/Landscape setting automatically(using codes) when printing a web page using File-Print menu options in the IE browser.
You need javascript for that task. take a look at:
http://javascript.internet.com/
for an archive of javascripts.