> I want to export a table in HTML from my
> MSFlexGrid which I might save to a text file.
> The file structure is simple and will display in any browser.
That shouldn't be too hard; just write a sub to read
each cell of the grid into a string, inserting the
appropriate tags in between. It might be a bit finicky
to get exactly right, but it's not technically difficult.
Then you can put it anywhere the browser can read it...
> However I would like to know if I can 'export'
> the text then build and display an HTML page
> without saving the data to disk...i.e.....can I display
> the HTML directly from say a text box and / or , can I call
> the default browser and 'pass' the html directly to it.
This, I think, would be the difficult part. I'm pretty
sure browsers can only look for _files_, be they local
or remote.
Unless you build your own *browser, of course! :)
> Thanks
>
> CharlesW
Martin Trump - 28 Nov 2004 17:03 GMT
>That shouldn't be too hard; just write a sub to read
>each cell of the grid into a string, inserting the
>appropriate tags in between. It might be a bit finicky
>to get exactly right, but it's not technically difficult.
A minor point. It might (or not) apply in this case. I did a similar job
recently and used a text HTML template. That was the HTML page but with
all the variable data replaced by asterisks. Much easier to do than
write code in VB to do it.
Read in the template line-by-line and check each for asterisk(s) and do
a Replace(...) for each asterisk consecutively with the required data.
Regards

Signature
Martin Trump
charles@home.com - 29 Nov 2004 09:36 GMT
Thanks for your help and suggestions...
creating the HTML is not really the problem.
I have added a form with a web browser on it (so I do
have some control.)
The webBrowser has some methods and properties.
Can I get my browser to display the HTML in one of my
'containers'. For example: can I add something similar an RTFBox
which might be called say an HTMLBox and get the browser
to display it.
Thanks,
CharlesW
> >That shouldn't be too hard; just write a sub to read
> >each cell of the grid into a string, inserting the
[quoted text clipped - 10 lines]
>
> Regards
charles@home.com - 29 Nov 2004 22:46 GMT
I found an example of exactly the kind of thing
I need.
It allows you to set the contents of an HTML page to be displayed,
from code which could be generated within any VB app.
It might be use to someone else so I added the URL
http://www.vb-helper.com/howto_set_webbrowser_contents.html
CharlesW
> Thanks for your help and suggestions...
> creating the HTML is not really the problem.
[quoted text clipped - 27 lines]
> >
> > Regards