Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can do that by calling <a href="http://en.wikipedia.org/wiki/Windows_PowerShell" rel="nofollow">PowerShell</a> either from .NET or c#.</p> <pre><code>function Export-MediaFromPptx($pptxFile) { [void] [System.Reflection.Assembly]::LoadFrom("C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\WindowsBase.dll") $pkg = [System.IO.Packaging.Package]::Open($pptxFile) $mediaDirectory = [System.IO.Path]::GetDirectoryName($pptxFile) + "\" + [System.IO.Path]::GetFileName($pptxFile) + "_media" md $mediaDirectory | out-null foreach ($mediaPart in ($pkg.GetParts() | where { $_.Uri.ToString().StartsWith("/ppt/media/") })) { $sourceStream = $mediaPart.GetStream() [byte[]]$buffer = new-object byte[] $sourceStream.Length [void]$sourceStream.Read($buffer, 0, $sourceStream.Length) $sourceStream.Close() $targetFileName = $mediaDirectory + "\" + $mediaPart.Uri.ToString().Remove(0, "/ppt/media/".Length) [System.IO.File]::WriteAllBytes($targetFileName, $buffer) } $pkg.Close() } </code></pre> <p>The above script was taken from this <a href="http://www.heikniemi.net/hardcoded/2010/04/extracting-media-files-from-a-powerpoint-presentation-with-powershell/" rel="nofollow">article</a>.</p> <p>This <a href="http://blogs.msdn.com/b/zainnab/archive/2008/07/26/calling-a-powershell-script-from-your-net-code.aspx" rel="nofollow">article</a> shows how to call it from .NET</p> <p>This <a href="http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C" rel="nofollow">article</a> shows how to call it from c#</p> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload