Narrative/Directions Response

2 posts / 0 new
Last post
Narrative/Directions Response


I've been looking online for vba instructions on how to return distance, time, and direction values into excel.  I've been able to find information on returning ditstance and time but 'directions' seems to have me stumped.  I am mostly interested in the 'narrative' portion to list all of the directions.  I've tried: CStr(xdoc.selectSingleNode("response / route / narrative").Text) but it keeps returning blank values.  Just wondering if anyone knew what I might be missing.  I've shown the distance/time code I was able to find online.

    refMiles = CSng(xdoc.selectSingleNode("response / route / distance").Text)
    refHours = CLng(xdoc.selectSingleNode("response / route / time").Text) / 60 / 60



There is no single parameter
There is no single parameter for the narrative like there is for time and distance. Each maneuver in a route response has a separate narrative value so you'll need to loop through those maneuvers. I don't know vba at all so I can't help with the code to do that.