If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Double Quote marks duplicated when outputting text to file
Hi,
I want to export a list of customer accounts into a Google KML file, so that clicking on the file will show all their locations on google earth. I have managed to generate the correct format of the KML file using a function I have created in Access97, and the output of the function is perfectly accurate. I have then saved the output to a text file ( but added a KML extension) , but during the output stage, double quotations are added at the beginning and at the end of the functions content, and in addition any double quotations that existed within the string are repeated. For example The first line should read ?xml version="1.0" encoding="UTF-8"? But it actually exports as "?xml version=""1.0"" encoding=""UTF-8""? Here's how I create my KML file using my function Open "C:\Users\JON.DONKEYNOB\Desktop\GOOGLE_EARTH" & [txt_type] & ".KML" For Output As #1 Write #1, GENERATE_GOOGLE_EARTH_LOCATIONS([txt_type]) Close #1 The variable txt_type is just a way that my function knows if I want to export live customers or potential customers from our sales Any help appreciated. Jon |
#2
|
|||
|
|||
Double Quote marks duplicated when outputting text to file
Try using Print instead of Write
John Spencer Access MVP 2002-2005, 2007-2008 The Hilltop Institute University of Maryland Baltimore County jon wrote: Hi, I want to export a list of customer accounts into a Google KML file, so that clicking on the file will show all their locations on google earth. I have managed to generate the correct format of the KML file using a function I have created in Access97, and the output of the function is perfectly accurate. I have then saved the output to a text file ( but added a KML extension) , but during the output stage, double quotations are added at the beginning and at the end of the functions content, and in addition any double quotations that existed within the string are repeated. For example The first line should read ?xml version="1.0" encoding="UTF-8"? But it actually exports as "?xml version=""1.0"" encoding=""UTF-8""? Here's how I create my KML file using my function Open "C:\Users\JON.DONKEYNOB\Desktop\GOOGLE_EARTH" & [txt_type] & ".KML" For Output As #1 Write #1, GENERATE_GOOGLE_EARTH_LOCATIONS([txt_type]) Close #1 The variable txt_type is just a way that my function knows if I want to export live customers or potential customers from our sales Any help appreciated. Jon |
#3
|
|||
|
|||
Double Quote marks duplicated when outputting text to file
Thats fantastic John,
Thanks for your help. I now have to replace some & characters within my script with + symbols (because I've found that Google doesn't like the & symbol. Any ideas how to do a find and replace within my function ? Jon "John Spencer" wrote in message ... Try using Print instead of Write John Spencer Access MVP 2002-2005, 2007-2008 The Hilltop Institute University of Maryland Baltimore County jon wrote: Hi, I want to export a list of customer accounts into a Google KML file, so that clicking on the file will show all their locations on google earth. I have managed to generate the correct format of the KML file using a function I have created in Access97, and the output of the function is perfectly accurate. I have then saved the output to a text file ( but added a KML extension) , but during the output stage, double quotations are added at the beginning and at the end of the functions content, and in addition any double quotations that existed within the string are repeated. For example The first line should read ?xml version="1.0" encoding="UTF-8"? But it actually exports as "?xml version=""1.0"" encoding=""UTF-8""? Here's how I create my KML file using my function Open "C:\Users\JON.DONKEYNOB\Desktop\GOOGLE_EARTH" & [txt_type] & ".KML" For Output As #1 Write #1, GENERATE_GOOGLE_EARTH_LOCATIONS([txt_type]) Close #1 The variable txt_type is just a way that my function knows if I want to export live customers or potential customers from our sales Any help appreciated. Jon |
#4
|
|||
|
|||
Double Quote marks duplicated when outputting text to file
Use the Replace function?
John Spencer Access MVP 2002-2005, 2007-2008 The Hilltop Institute University of Maryland Baltimore County jon wrote: Thats fantastic John, Thanks for your help. I now have to replace some & characters within my script with + symbols (because I've found that Google doesn't like the & symbol. Any ideas how to do a find and replace within my function ? Jon "John Spencer" wrote in message ... Try using Print instead of Write John Spencer Access MVP 2002-2005, 2007-2008 The Hilltop Institute University of Maryland Baltimore County jon wrote: Hi, I want to export a list of customer accounts into a Google KML file, so that clicking on the file will show all their locations on google earth. I have managed to generate the correct format of the KML file using a function I have created in Access97, and the output of the function is perfectly accurate. I have then saved the output to a text file ( but added a KML extension) , but during the output stage, double quotations are added at the beginning and at the end of the functions content, and in addition any double quotations that existed within the string are repeated. For example The first line should read ?xml version="1.0" encoding="UTF-8"? But it actually exports as "?xml version=""1.0"" encoding=""UTF-8""? Here's how I create my KML file using my function Open "C:\Users\JON.DONKEYNOB\Desktop\GOOGLE_EARTH" & [txt_type] & ".KML" For Output As #1 Write #1, GENERATE_GOOGLE_EARTH_LOCATIONS([txt_type]) Close #1 The variable txt_type is just a way that my function knows if I want to export live customers or potential customers from our sales Any help appreciated. Jon |
Thread Tools | |
Display Modes | |
|
|