Aspose.Words.Examples.CSharp.Programming_Documents.Working_With_Document.DocumentBuilderInsertElements.InsertOleObject C# (CSharp) Method

InsertOleObject() public static method

public static InsertOleObject ( string dataDir ) : void
dataDir string
return void
        public static void InsertOleObject(string dataDir)
        {
            // ExStart:DocumentBuilderInsertOleObject
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);
            builder.InsertOleObject("http://www.aspose.com", "htmlfile", true, true, null);
            dataDir = dataDir + "DocumentBuilderInsertOleObject_out.doc";
            doc.Save(dataDir);
            // ExEnd:DocumentBuilderInsertOleObject
            Console.WriteLine("\nOleObject using DocumentBuilder inserted successfully into a document.\nFile saved at " + dataDir);
        }