Hi,
Thanks
for your interest in Aspose.Slides.
The currently
available method for converting a Word document to a PowerPoint slide is to
embed the Word document as an OLE Object within the presentation slide. You may
please try using the following code to accomplish your requirement. However, if
you want to add each page of Word document on a separate slide, you may please
read the Word file page by page and then embedding each page as a separate OLE
Object on an individual slide. I am afraid; I am not familiar with reading a Word
document page by page. So, for that reason, I have asked my fellow developer
from Aspose.Words team to answer this query further.
//Read
the MS-WORD file into the stream
FileStream
fin = new FileStream("c:\\sample.doc", FileMode.Open, FileAccess.Read);
byte[]
byts = new byte[fin.Length];
fin.Read(byts, 0, (int)fin.Length);
fin.Close();
//Create
the presentation and insert the MS-WORD file
Presentation
dstPres = new Presentation();
Slide
dstSld = dstPres.GetSlideByPosition(1);
OleObjectFrame
oof = dstSld.Shapes.AddOleObjectFrame(100, 100, 3000, 3000, "Microsoft Word Document", byts);
//Write
the presentation on disk
dstPres.Write(@"d:\ppt\destination.ppt");
Sorry
for the inconvenience.
Mudassir Fayyaz
Support Developer
Aspose Sialkot Team
Contact Us Aspose - The .NET and Java Component Publisher