D
Dan
I have developed a .net PowerPoint AddIn to automate a presentation. Each slide contains an embedded spreadsheet, with an XML Map. The .net program accesses a database to retrieve an XmlDocument, and updates the XML Map using something like this
Slide slide = (Slide)myPresentation.Slides[1]
Shape shape = (Shape)slide.Shapes[1]
_Workbook workbook = (_Workbook)shape.OLEFormat.Object
XmlMap map = (XmlMap)workbook.XmlMaps[1]
map.ImportXml(xmlDoc.OuterXml, true)
In PowerPoint Normal view, this works fine - cells containing the XML map plus dependent cells are updated
However, in Slide Show mode, I generally get a COMException ("Object is not connected to server") on the 3rd line
If I catch the exception and repeat, the 3rd line succeeds and I get a NullReferenceException ("Invalid pointer") on the 4th line
Neither of these seems to be very consistent - it has worked at least once!
If anyone has experience of this, I would appreciate your help
Dan
Slide slide = (Slide)myPresentation.Slides[1]
Shape shape = (Shape)slide.Shapes[1]
_Workbook workbook = (_Workbook)shape.OLEFormat.Object
XmlMap map = (XmlMap)workbook.XmlMaps[1]
map.ImportXml(xmlDoc.OuterXml, true)
In PowerPoint Normal view, this works fine - cells containing the XML map plus dependent cells are updated
However, in Slide Show mode, I generally get a COMException ("Object is not connected to server") on the 3rd line
If I catch the exception and repeat, the 3rd line succeeds and I get a NullReferenceException ("Invalid pointer") on the 4th line
Neither of these seems to be very consistent - it has worked at least once!
If anyone has experience of this, I would appreciate your help
Dan