Sub ExportInvoiceXML() Dim xlMap As XmlMap Set xlMap = ThisWorkbook.XmlMaps("Invoice_Map") If xlMap.IsExportable Then xlMap.Export "C:\testxmljunk.xml" Else MsgBox "Sorry, this XML Map is not exportable", vbOKOnly End If Set xlMap = Nothing End Sub