jaesung Yoo
Posts: 1
Joined: 2017-10-19
|
Hello, I am using following version.
Add-in express : 8.7.4430.0
VSTO : 15.0.0.0
I want to add youtube video, flash , html in PowerPoint slide using Add-in Express.
Here is part of the source code.
<Youtube Vidoe Insert code>
const string embeddedTag = @"<object><param name='movie' value='http://www.youtube.com/v/Jfa1eAHr4Ks&version=2'></object>";
PowerPoint.Shape youtubeShape = activeSlide.Shapes.AddMediaObjectFromEmbedTag(embeddedTag, 5, 5, 400, 500);
<flash Insert code>
const string swfurl = "http://teacher.i-scream.co.kr/files/contents/1036/01/swf/1036_01_101_01.swf";
shape = shapes.AddMediaObject2(swfurl, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoTrue,
10, 10, 300, 300);
But,No action is performed when I click the button.
What is the problem? |
|
Andrei Smolin
Add-in Express team
Posts: 18825
Joined: 2006-05-11
|
Hello jaesung,
The VBA macro below works for me:
Sub InsertYoutubeVideo()
ActivePresentation.Slides(1).Shapes.AddMediaObjectFromEmbedTag EmbedTag:= _
"<object width=""560"" height=""315"">" & _
"<param name=""movie"" value=""http://www.youtube.com/v/Jfa1eAHr4Ks?version=3&hl=en_US""></param>" & _
"<param name=""allowFullScreen"" value=""true""></param>" & _
"<param name=""allowscriptaccess"" value=""always""></param>" & _
"<embed src=""http://www.youtube.com/v/Jfa1eAHr4Ks?version=3&hl=en_US"" " & _
"type=""application/x-shockwave-flash"" width=""560"" height=""315"" " & _
"allowscriptaccess=""always"" allowfullscreen=""true""></embed></object>"
End Sub
As to the second example, at https://stackoverflow.com/questions/3050735/power-point-2010-youtube-embeding-problem, they suggest that the issue may relate to bitness of Flash. Check if this is the case.
Andrei Smolin
Add-in Express Team Leader |
|