store file in string...not openfile

T

Trint Smith

How can I store an entire html file in a string with all it's formating,
double quotes, multiple lines and all??
like this:

Dim FileString As String = ENTIRE HTML FILE

thanks,
Trint

.Net programmer
(e-mail address removed)
 
J

Jay B. Harlow [MVP - Outlook]

Trint,
Have you tried the code in your previous message, only with double nested
quotes?

Dim file As String = "<html xmlns:v=""urn:schemas-microsoft-com:vml""" _
"xmlns:blush:=""urn:schemas-microsoft-com:blush:ffice:blush:ffice""" _
"xmlns:dt=""uuid:C2F41010-65B3-11d1-A29F-00AA00C14882""" _
...

Because its a "constant" it will be evulated at run time as a single string.

However! rather then go through the tedium of typing that, I would consider
embedding the HTML file as a resource into my assembly, then read the
resource into the string when I needed it.

I don't have a specific sample of embedding an HTML file, however I would
start here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriUsingResources.asp

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top