Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unwelcome quotation marks

Status
Not open for further replies.

mrsbean

Technical User
Jul 14, 2004
203
US
I am using an Access database to create some simple html pages. I have hundreds of them to do, and it was a tedious job to do them individually, so I got the idea to create a simple database to hold the variables for each page.

Before you suggest that I just create a dynamic site, the purpose of these pages is for search engine optimization of a complex catalog and it wasn't my idea.

For some strange reason, my code creates a quotation mark at the beginning and the end of my html file which is created. Can anybody tell me how to get rid of it (using code)?

Code:
Do Until rst.EOF

htmlOut = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01
Transitional//EN'> " & vbCrLf & _
"<html> " & vbCrLf & _
"<head> " & vbCrLf & _
"<title>" & rst("webhTitle") & "</title> " & vbCrLf & _
"<meta name='keywords' content='" & rst("webhKeywords") & "'>" &
vbCrLf

Open "c:\HTMLFILES\" & rst("webdPage") For Output As #1
Write #1, htmlOut
Close #1

rst.MoveNext
Loop

MrsBean
 
Use
Code:
Print #1, htmlOut
Access Help said:
Unlike the Print # statement, the Write # statement inserts commas between items and quotation marks around strings as they are written to the file. You don't have to put explicit delimiters in the list.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
How are ya mrsbean . . .

Use [blue]Print #1[/blue] instead! . . .

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top