We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word document in a slides


i would like to insert a word document into a slide, is this possible?

Dear Adam,

Yes, try this code.

//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);


//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


great it works, thanks!