>This does a Select All of the current webpage and then Copies that into my clipboard. This works great but I also want to pull the HTML source under the "View" -> "Source" menu, but I can't figure out how to do this programmatically. I looked at the available commands on MSDN but don't see one for that.
IE does rewrite HTML a bit to something MS seems think of as better HTML - it is NOT the original source. Cetin's way will get you the origininal HTML, which you can from IE only by tricking it: ask for IPersistFile or IPersistStream-Interfaces on the .document and call the methods of that interface: it gets unaltered HTML. The beautified HTML (which I think view source shows, haven't tested for a long time) can be reached through a number of ways via the DOM as Dragan mentioned. IE>5 supports IHTML3 interfaces, there should be a method on DocumentElement to get it all or get the inner/outerHTML of the root element...
Object browser is your friend...
HTH
thomas
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only