IHTMLDocument2
-
Hello again, Does anybody know how to create a new IHTMLDocument2 object and then add/insert elements to it? To date, the only way i've found to initialise a IHTMLDocument2 object, has been to load up a (blank) html page and associate it with the new object. Surely, there must be a programmatical way of creating new HTML docs a fresh, without having to load a pre-existing blank web page (i.e to use as a template) everytime? Thanks in advance. Roy
-
Hello again, Does anybody know how to create a new IHTMLDocument2 object and then add/insert elements to it? To date, the only way i've found to initialise a IHTMLDocument2 object, has been to load up a (blank) html page and associate it with the new object. Surely, there must be a programmatical way of creating new HTML docs a fresh, without having to load a pre-existing blank web page (i.e to use as a template) everytime? Thanks in advance. Roy
Is this what you mean.
-
Is this what you mean.
Hi Mark, Sorry, was there supposed to be a URL or code fragment attached to your reply? Roy
-
Hello again, Does anybody know how to create a new IHTMLDocument2 object and then add/insert elements to it? To date, the only way i've found to initialise a IHTMLDocument2 object, has been to load up a (blank) html page and associate it with the new object. Surely, there must be a programmatical way of creating new HTML docs a fresh, without having to load a pre-existing blank web page (i.e to use as a template) everytime? Thanks in advance. Roy
Hi, I've got little words for your question but don't have any real code fragments that I've used.(I did some similar job what you said in your posting.) 1. Call CreateStreamOHGlobal. (Anyway, you have to allocate some memory or object to physical memory.) 2. Init New stream object with some Text or anything else.(Not Mandatory) 3. Load stream object to your MSHTML instance. If any of you know better COM-style way to implement this, plz comment. Regards, Ryan -p.s If you're not familiar with COM, I guess your current method is sufficient.:)
-
Hi Mark, Sorry, was there supposed to be a URL or code fragment attached to your reply? Roy
The word "this" was hyperlinked to http://www.codeproject.com/soap/xml\_html.asp