Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

How to add a HTML content into Shape with Open XML in Power Point?

$
0
0

Hello,

I have been working since a couple of years with Open XML, but using Word Processing. Now I am trying to apply the same configuration to Power Point Presentation.

I would like to know if it is possible to add HTML content into a Shape in OpenXML.

Are there equivalent code for this?

((MainDocumentPart)xmlPart).AddAlternativeFormatImportPart(AlternativeFormatImportPartType.Html, altChunkId);

This could be the result code in PowerPoint (slide1.xml)

<p:sp><p:nvSpPr><p:cNvPr id="4" name="IIIIDDD" /><p:cNvSpPr txBox="1" /><p:nvPr /></p:nvSpPr><p:spPr><a:xfrm><a:off x="432329" y="4131204" /><a:ext cx="11243204" cy="2574395" /></a:xfrm><a:prstGeom prst="rect"><a:avLst /></a:prstGeom></p:spPr><p:txBody><a:bodyPr wrap="square" /><a:p><a:r><a:t>&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;meta charset='utf-8'/&gt;&lt;/head&gt;&lt;body&gt;&lt;table cellspacing='0' cellpadding='0' widht='100%' style='width:100%;border:none;border-collapse:collapse;'&gt;&lt;thead style='background-color:#E0E1E1;color:#343B45;font-size:12px;font-weight:bold;'&gt;&lt;tr &gt;&lt;td style='padding-left:10px;padding-right:10px;border:none;border-collapse:collapse;' valign='middle'&gt;&lt;span&gt;Attachments&lt;/span&gt;&lt;/td&gt;&lt;td style='padding-left:10px;padding-right:10px;border:none;border-collapse:collapse;' valign='middle'&gt;&lt;span&gt;ID&lt;/span&gt;&lt;/td&gt;&lt;td style='padding-left:10px;padding-right:10px;border:none;border-collapse:collapse;' valign='middle'&gt;&lt;span&gt;Title&lt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</a:t></a:r><a:endParaRPr /></a:p></p:txBody></p:sp>
Obviously, the code above returns an error on Power point.

Thank you!







Viewing all articles
Browse latest Browse all 1288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>