Here is a power point macro that will create a slide from data in an XML file. Save the XML file (the second code segment) and adjust the file path/name variables for this file as necessary. You also need to include the MSXML v4.0 library (goto Tools->References in the VB editor).
Here is the subroutine:
Sub createPPT()
Dim xmlFileName As String
Dim fileDirectory As String
Dim strMET As String
Dim pre As Presentation
Dim sld As Slide
Dim xmlNode As IXMLDOMNode
Dim METAR As IXMLDOMNode
Dim xDoc As New MSXML2.DOMDocument40
fileDirectory = "C:\Documents and Settings\HP_Administrator\My Documents\"
xmlFileName = "wxBriefInfo.xml"
xDoc.Load (fileDirectory & xmlFileName)
Set METAR = xDoc.selectSingleNode("//KMEI/TAF")
strMET = METAR.Text
Set pre = ActivePresentation()
Set sld = pre.Slides.Add(pre.Slides.Count + 1, ppLayoutText)
sld.Shapes(2).TextFrame.TextRange = strMET
End Sub
Here is the XML file:
PHP Code:
<?xml version="1.0" encoding="utf-8"?>
<stations>
<KMEI>
<METAR> Weather Report Here </METAR>
<TAF> Weather Forecast Here </TAF>
</KMEI>
</stations>
Finally- I got this far thanks to DRJ's knowledge base article: http://vbaexpress.com/kb/getarticle.php?kb_id=177