View Single Post
 
Old 05-05-2014, 08:56 AM
afppaul afppaul is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: May 2014
Posts: 2
afppaul is on a distinguished road
Default extract node values from an XML file and insert into body of an email

So far I have put together some code that looks in a public folder, gets any files that have been received in the past X amount if time, moves .rar file to a folder on the desktop, extracts XML file into sub folder and deletes the .rar file. To take this a bit further i've been asked to extract certain node values from XML file and insert them into the body of a new email. I'm able to open a new email and insert the proper To: Cc: and Subject. I'm just not sure how to extract the xml values and insert them into body of email. The schema for the xml file i'm told will always stay the same. By using the following code i'm able to view the full node schema and values in the intermadiate window of the vb editor. I would like to insert four of these values into the body of an email.

Code:
Dim xmlDocument As MSXML2.DOMDocument60
Set xmlDocument = New DOMDocument60
xmlDocument.Load ("file path and name.xml")
Debug.Print xmlDocument.xml
Reply With Quote