I have a VBA script that creates a blank KML and writes to it, pulling from query fields to populate the description/pop-up bubble, and the place marks (from a coordinates field in the Access DB).
I would now like to add an image to the description in the KML and was interested in embedding that image into the Access DB and pulling from it like I did with the other values. I tried embedding an image as an OLE object in a field of the DB and accessing it like so, where MyRS refers to the query that it is pulling information from, and field 0, for example, would refer to the OLE object:
Print #KMLTest, " <Placemark>"
strText = " <description><![CDATA[img src="" & MyRS.Fields(0) & ""<br>Name: " & MyRS.Fields(1) & "<br>Agency: " & MyRS.Fields(2) & "<br>Address: " & MyRS.Fields(3) & "]]></description>"
Print #KMLTest, strText
The above method does not work. I am pretty new to Access (and databases in general) so forgive me if this is a dumb question, though I have found it difficult to find specific information regarding this topic and was wondering if anyone had any insights. I figure it has something to do with how the an OLE is stored, which is not being recognized by the KML when I am referencing it in the element. Is there a way I can link this embedded OLE into the KML straight from Access? Or will I have to link it from outside the DB?
Any help is appreciated.
Thank you.