Common C#/C# BEST TIP2009. 5. 15. 15:24
Assembly assembly = Assembly.GetExecutingAssembly();
Version ver = assembly.GetName().Version; <-버전 클래스

------ 꼽사리 ------ powerPoint
using System;
using System.IO;
using System.Text.RegularExpressions;
using Microsoft.Office.Core;
using Microsoft.Office.Interop.PowerPoint;

namespace ExtractImage
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.WriteLine("Usage: {0} powerpoint.ppt", System.Windows.Forms.Application.ExecutablePath);
                return;
            }

            string fileName = args[0];
            FileInfo info = new FileInfo(fileName);
            ExtractImage(info.FullName);
        }

        static void ExtractImage(string fileName)
        {
            ApplicationClass app = new ApplicationClass();
            Presentation ppt =
               app.Presentations.Open(fileName, MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoFalse);

            Regex re = new Regex(@".ppt$", RegexOptions.IgnoreCase);
            string imgFile = re.Replace(fileName, "");

            for (int i = 0; i < ppt.Slides.Count; ++i)
            {
                ppt.Slides[i + 1].Export(imgFile + i + ".png", "PNG", 960, 720);
            }

            ppt.Close();
            app.Quit();
        }
    }
}
Posted by penguindori