If you do not mind using a 3rg party library, i would suggest that you try Free Spire.Office, which is a community edition of Spire.Office.
Step 1. Install Free Spire.Office for .NET (also available on NuGet).
Step 2. Refer to the following code example to embed a Word document as an OEL object in a slide.
using System.IO;
using Spire.Doc;
using Spire.Presentation;
using System.Drawing;
using Spire.Presentation.Drawing;
namespace EmbedDocxToPptx
{
class Program
{
static void Main(string[] args)
{
//Load Word document
Document doc = new Document();
doc.LoadFromFile(@"C:\Users\Administrator\Desktop\Styles.docx");
//Load PowerPoint document
Presentation ppt = new Presentation();
ppt.LoadFromFile(@"C:\Users\Administrator\Desktop\source.pptx");
//Load an image, whcih will be used as an display icon
IImageData oleImage = ppt.Images.Append(Image.FromFile(@"C:\Users\Administrator\Desktop\docx-icon.png"));
//Create a Rectangle object, which defines the position and size of the display icon
Rectangle rect = new Rectangle(100, 60, oleImage.Width, oleImage.Height);
using (MemoryStream ms = new MemoryStream())
{
//Convert Word to stream
doc.SaveToStream(ms, Spire.Doc.FileFormat.Docx2013);
ms.Position = 0;
//Insert the Word document as an OLE object in a slide
IOleObject oleObject = ppt.Slides[0].Shapes.AppendOleObject("word", ms.ToArray(), rect);
//Set the display icon
oleObject.SubstituteImagePictureFillFormat.Picture.EmbedImage = oleImage;
oleObject.IsIconVisible = true;
oleObject.ProgId = "Word.Document.12";
}
//Save the PowerPoint document to another file
ppt.SaveToFile("InsertOle.pptx", Spire.Presentation.FileFormat.Pptx2013);
}
}
}