Results 1 to 1 of 1
2002-03-07, 00:15 #1
- Join Date
- Jan 2001
- Melbourne, Victoria, Australia
- Thanked 0 Times in 0 Posts
Generating a web page programmatically (Office 2000 Sr1a)
By combining data from a contacts table and a table of pre-written blocks of text stored in a memo field I have (almost) written a procedure that will generate the HTML for a web page that is personalised for the contact of my choice from the contacts table.
All is fine except I am now at the point where the HTML that will create the page is stored in a string variable
(strHTML) in my routine. I know it is ok because I can debug.print strHTML to the immediate window, copy the result, paste it into notepad, save it as
an html fle and it is all correct when viewed in a browser.
The question is: how can you automatically save the contents of strHTML into the html file in the folder of your choice?
I've tried writing strHTML directly to a file by using
the Open "webpage.html" for Output as #1 etc
but there are errors in the result.
Any idea how to achieve this please?
Really I'm asking what is the simplest VBA procedure in Access to cut and paste the string's contents exactly into a text file and save it as an HTML file.
Any ideas much appreciated.