how do I successfully compile this code from the commandline, using csc.exe, in terms of which dll's I should reference. I would like this to work with Office 2007 as well as Office 2003.
I am use DotNet Framework SDK 2.0.
I get this compilation error:
(2,37): error CS0234: The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office' (are you missing an assembly reference?)
using Microsoft.Office.Core;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
namespace PPInterop
{
class Program
{
static void Main(string[] args)
{
PowerPoint.Application app = new PowerPoint.Application();
PowerPoint.Presentations pres = app.Presentations;
PowerPoint._Presentation file = pres.Open(@"C:\project\JavaTut1.ppt", MsoTriState.msoTrue, MsoTriState.msoTrue, MsoTriState.msoFalse);
file.SaveCopyAs(@"C:\project\presentation1.jpg", Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType.ppSaveAsJPG, MsoTriState.msoTrue);
}
}
}