Insert HTML in PowerPoint document with a content add-in - powerpoint

I am looking to develop an Office content add-in for PowerPoint. The purpose of this add-in is to embed HTML(an iframe) into a slide. Something similar to Web Video Player.
Looking at the docs, the way you would implement this is via Document.setSelectedDataAsync, however the HTML coercion type is not supported in PowerPoint.
Is there another way to insert/embed HTML content into PowerPoint, seeing as the add-in linked above is able to do it?

Web video player shows the HTML directly in the content pane for the add-in instead of inserting it into the document. For example, you could use something like:
document.body.innerHTML = myCustomSlideHTML;
-Michael (developer of Web Video Player)

Related

Creating Link to a Specific Powerpoint Slide via Add-in

If you right click on a Powerpoint slide in the online web app, you can use the "Link to this slide" menu to get a URL. That URL can be used to take you back to that specific slide.
We have a Powerpoint add-in and there does not appear to be a way to access that URL programmatically so I would like to try and generate it.
I have found that the URL contains a URL parameter called "nav" and this is a base64 encoded string. Here is what it looks like when decoded:
{"sId":258,"cId":649829976}
I know the sID is the slide ID and I can obtain this programmatically within the add-in.
Does anyone know what the "cId" is? For each slide, it is different so I don't think it is something using to the document itself, but rather it is tied to the slide.

How to make Outlook Add-in open in the side pane

I developing an outlook add-in for Office 365 and currently showing it in the grey bar below a mail item's details. So when clicking on the add-in name, I get a pane below it like this:
However, I want it to display it like Trello in the side pane like this:
Is there any specific setting in the add-in manifest that I need to include to get it to work like the Trello add-in?
You would need to use "VersionOverrides" tag for your manifest. Inside this section you would use...
<ExtensionPoint xsi:type="MessageReadCommandSurface">
and for the action you would "ShowTaskPane" with the resource pointed to the HTML file you would like to load. The example of such manifest you may find at GitHub for OfficeDev team

Insert image via PPT Add-In

I'm programming a PowerPoint Add-In in VBA. I want to have a button to insert the 'default company logo'. The logo is a vector image.
Is it possible to embed the image 'in the add-in itself'? Such that every user who has the add-in, doesn't need the logo file separately as image?
Unfortunately, PowerPoint add-ins contain only code, no slides, graphics or other content, so you can't embed the graphic in the add-in as a graphic.
You could probably add code to the add-in that writes the binary data for the logo graphic out to a file, insert from there, then delete the file (or leave it there for the next use).
Thanks for your responses! :)
I found a workaround which I like to share.
I converted the picture to an eps-file. Since the eps-file is text-based, I made a VBA-function in my add-in that writes the lines of the eps-image to a temporary text-file called img.eps. Now I can insert the image to my powerpoint slides by the add-in and delete the temporary eps-file.

Outlook 2012 signature with image without attachment

I am trying to create an email signature in outlook 2010 with the company logo embedded.
As i am working my way trough this, i find it very strange that the included image is sent as an attachment.
It doesn't show as attachment on Outlook from other users. But it does on Mac, hotmail and so on..
I have already tried to include it via HTML, thus placing the image on a FTP and loading it from there, and i have tried including it trough the signature editor, both won't make it work..
Is there a code to make this function?
Why do you find it strange that the image is included as an attachment? Without it, there is no way for the recipient to view the image, as the email itself is text only. I imagine the only reason it doesn't show as an attachment in outlook is because outlook is smart enough to know that it's not a "real attachment" per se, but just the signature. Even then, I remember recieving signature images as attachments in older versions of outlook.
That said, it should be possible to use a linked image in your signature. This link explains how to do it.
Creating an Outlook signature with an image or picture located on the Internet requires changing Outlook’s behavior on how to deal with linked images and also adding the image in a specific way. Once the image is inserted, you can use the Signature Editor to turn the image into a hyperlink to a website.
Set Outlook to link to pictures instead of embedding them
The first step is to change Outlook’s behavior on how to deal with linked pictures. By default Outlook will embed them with the message, but this would mean that your picture would be a reflection of when you created the message instead of when the the recipient is reading (or even re-reading) your message.
Depending on how often you change your picture, this might be a non-issue but it would also mean that the picture gets added each time and thus making each message quite a bit larger. In several cases this could also result in your picture being added as an attachment and/or show the message with a paperclip icon.
These are all things that you should want to avoid; if not for you, then definitely for the recipient’s sake.
In Outlook 2003 and previous you can change this behavior via;
Tools-> Options…-> tab Mail Format-> button Internet Format-> option: When an HTML message contains pictures located on the Internet , send a copy of the pictures instead of the reference to their location.
In Outlook 2007 and 2010, this can behavior can only be changed via the Registry.
Key: HKEY_CURRENT_USER\Software\Microsoft\Office\\Outlook\Options\Mail
Value name; Send Pictures With Document
Value: 0
For more info about this registry key see; Where did "HTML options" go in Outlook 2007/2010?
Insert image as link
When inserting the image into your signature, you must again make sure that the image is linked. If you do not do this, then the current image will be downloaded and saved within your signature and wouldn’t update when you change it on-line.
Outlook 2003
Right click in the Signature Editor (do not use Advanced Edit) and choose; Insert Image…
Type the Internet address (URL) to the image in full when prompted for the Picture Source.
Click OK
Outlook 2007 and Outlook 2010
Click on the Picture icon in the Signature Editor
As the file name, type the Internet address (URL) to the image in full.
Instead of clicking on Insert, click on the little down arrow on the Insert button and choose; Link to File
Create a hyperlink
Once the image has been added, you can make it clickable and point it to a website via the the Hyperlink function.
Outlook 2003
Right click on the inserted image and choose; Edit Hyperlink
Outlook 2007 and Outlook 2010
Select the image and click on the Hyperlink icon
It seems to be more a matter of how the client displays it. Different clients are going to deal with the image in different ways, especially from a security standpoint. Have you tried linking to an image directly from the Web?
Here's some additional info:
http://www.howto-outlook.com/faq/imagesignature.htm

Inject Open XML into an Open PowerPoint Presentation

I'm looking for a way to inject PresentationML and/or DrawingML into an open PowerPoint 2007/2010 presentation using the Open XML SDK or just System.IO.Packaging. There is an article on doing this with Word, but in that example it is using the Range.XML routine in Word's object model, which I cannot find an equivalant for in PowerPoint's object model.
The reason I'm looking to do this is if I have an item on it that the PowerPoint client does not support editing of but that Open XML does (and as a result, PowerPoint will display it). I want to set this myself via a managed-addin (VSTO) on the open presentation. An example would be the underline of text (not that I'm looking for this, but it is an example) - in PowerPoint, you cannot make the underline of text a picture <a:blip/>, but in Open XML you can.
Does anyone know how to do this?
I am using both OpenXML SDK 2 and the Object Model to process presentations.
What I do, simplistic as it sounds, is to save the presentation, close it, perform all the XML modifications I need using OpenXML SDK, and then load the presentation back and continue with the Object Model.
Nope, according to Microsoft support: http://www.ureader.com/msg/10972430.aspx

Resources